Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit 95a645c

Browse files
committed
fix(lists): reorderable lists could not be reordered on some platforms
1 parent 6ad9354 commit 95a645c

File tree

5 files changed

+42
-592
lines changed

5 files changed

+42
-592
lines changed

lib/system/environment.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ class LunaEnvironment {
33

44
static const String commit = 'master';
55

6-
static const String flavor = 'stable';
6+
static const String flavor = 'edge';
77
}

lib/types/indexer_icon.dart

+39-37
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,67 @@ import 'package:lunasea/core.dart';
33

44
part 'indexer_icon.g.dart';
55

6+
const _GENERIC = 'generic';
7+
const _DOGNZB = 'dognzb';
8+
const _DRUNKENSLUG = 'drunkenslug';
9+
const _NZBFINDER = 'nzbfinder';
10+
const _NZBGEEK = 'nzbgeek';
11+
const _NZBHYDRA = 'nzbhydra';
12+
const _NZBSU = 'nzbsu';
13+
14+
@JsonEnum()
615
@HiveType(typeId: 22, adapterName: 'LunaIndexerIconAdapter')
716
enum LunaIndexerIcon {
17+
@JsonValue(_GENERIC)
818
@HiveField(0)
9-
GENERIC,
19+
GENERIC(_GENERIC),
20+
21+
@JsonValue(_DOGNZB)
1022
@HiveField(1)
11-
DOGNZB,
23+
DOGNZB(_DOGNZB),
24+
25+
@JsonValue(_DRUNKENSLUG)
1226
@HiveField(2)
13-
DRUNKENSLUG,
27+
DRUNKENSLUG(_DRUNKENSLUG),
28+
29+
@JsonValue(_NZBFINDER)
1430
@HiveField(3)
15-
NZBFINDER,
31+
NZBFINDER(_NZBFINDER),
32+
33+
@JsonValue(_NZBGEEK)
1634
@HiveField(4)
17-
NZBGEEK,
35+
NZBGEEK(_NZBGEEK),
36+
37+
@JsonValue(_NZBHYDRA)
1838
@HiveField(5)
19-
NZBHYDRA,
39+
NZBHYDRA(_NZBHYDRA),
40+
41+
@JsonValue(_NZBSU)
2042
@HiveField(6)
21-
NZBSU,
22-
}
43+
NZBSU(_NZBSU);
44+
45+
final String key;
46+
const LunaIndexerIcon(this.key);
2347

24-
extension LunaIndexerIconExtension on LunaIndexerIcon {
25-
LunaIndexerIcon fromKey(String key) {
48+
static LunaIndexerIcon fromKey(String key) {
2649
switch (key) {
27-
case 'generic':
28-
return LunaIndexerIcon.GENERIC;
29-
case 'dognzb':
50+
case _DOGNZB:
3051
return LunaIndexerIcon.DOGNZB;
31-
case 'drunkenslug':
52+
case _DRUNKENSLUG:
3253
return LunaIndexerIcon.DRUNKENSLUG;
33-
case 'nzbfinder':
54+
case _NZBFINDER:
3455
return LunaIndexerIcon.NZBFINDER;
35-
case 'nzbgeek':
56+
case _NZBGEEK:
3657
return LunaIndexerIcon.NZBGEEK;
37-
case 'nzbhydra':
58+
case _NZBHYDRA:
3859
return LunaIndexerIcon.NZBHYDRA;
39-
case 'nzbsu':
60+
case _NZBSU:
4061
return LunaIndexerIcon.NZBSU;
4162
default:
4263
return LunaIndexerIcon.GENERIC;
4364
}
4465
}
4566

46-
String get key {
47-
switch (this) {
48-
case LunaIndexerIcon.GENERIC:
49-
return 'generic';
50-
case LunaIndexerIcon.DOGNZB:
51-
return 'dognzb';
52-
case LunaIndexerIcon.DRUNKENSLUG:
53-
return 'drunkenslug';
54-
case LunaIndexerIcon.NZBFINDER:
55-
return 'nzbfinder';
56-
case LunaIndexerIcon.NZBGEEK:
57-
return 'nzbgeek';
58-
case LunaIndexerIcon.NZBHYDRA:
59-
return 'nzbhydra';
60-
case LunaIndexerIcon.NZBSU:
61-
return 'nzbsu';
62-
}
63-
}
64-
6567
String get name {
6668
switch (this) {
6769
case LunaIndexerIcon.GENERIC:

0 commit comments

Comments
 (0)