Skip to content

Commit

Permalink
fix(lists): reorderable lists could not be reordered on some platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
JagandeepBrar committed Jun 15, 2022
1 parent 6ad9354 commit 95a645c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 592 deletions.
2 changes: 1 addition & 1 deletion lib/system/environment.dart
Expand Up @@ -3,5 +3,5 @@ class LunaEnvironment {

static const String commit = 'master';

static const String flavor = 'stable';
static const String flavor = 'edge';
}
76 changes: 39 additions & 37 deletions lib/types/indexer_icon.dart
Expand Up @@ -3,65 +3,67 @@ import 'package:lunasea/core.dart';

part 'indexer_icon.g.dart';

const _GENERIC = 'generic';
const _DOGNZB = 'dognzb';
const _DRUNKENSLUG = 'drunkenslug';
const _NZBFINDER = 'nzbfinder';
const _NZBGEEK = 'nzbgeek';
const _NZBHYDRA = 'nzbhydra';
const _NZBSU = 'nzbsu';

@JsonEnum()
@HiveType(typeId: 22, adapterName: 'LunaIndexerIconAdapter')
enum LunaIndexerIcon {
@JsonValue(_GENERIC)
@HiveField(0)
GENERIC,
GENERIC(_GENERIC),

@JsonValue(_DOGNZB)
@HiveField(1)
DOGNZB,
DOGNZB(_DOGNZB),

@JsonValue(_DRUNKENSLUG)
@HiveField(2)
DRUNKENSLUG,
DRUNKENSLUG(_DRUNKENSLUG),

@JsonValue(_NZBFINDER)
@HiveField(3)
NZBFINDER,
NZBFINDER(_NZBFINDER),

@JsonValue(_NZBGEEK)
@HiveField(4)
NZBGEEK,
NZBGEEK(_NZBGEEK),

@JsonValue(_NZBHYDRA)
@HiveField(5)
NZBHYDRA,
NZBHYDRA(_NZBHYDRA),

@JsonValue(_NZBSU)
@HiveField(6)
NZBSU,
}
NZBSU(_NZBSU);

final String key;
const LunaIndexerIcon(this.key);

extension LunaIndexerIconExtension on LunaIndexerIcon {
LunaIndexerIcon fromKey(String key) {
static LunaIndexerIcon fromKey(String key) {
switch (key) {
case 'generic':
return LunaIndexerIcon.GENERIC;
case 'dognzb':
case _DOGNZB:
return LunaIndexerIcon.DOGNZB;
case 'drunkenslug':
case _DRUNKENSLUG:
return LunaIndexerIcon.DRUNKENSLUG;
case 'nzbfinder':
case _NZBFINDER:
return LunaIndexerIcon.NZBFINDER;
case 'nzbgeek':
case _NZBGEEK:
return LunaIndexerIcon.NZBGEEK;
case 'nzbhydra':
case _NZBHYDRA:
return LunaIndexerIcon.NZBHYDRA;
case 'nzbsu':
case _NZBSU:
return LunaIndexerIcon.NZBSU;
default:
return LunaIndexerIcon.GENERIC;
}
}

String get key {
switch (this) {
case LunaIndexerIcon.GENERIC:
return 'generic';
case LunaIndexerIcon.DOGNZB:
return 'dognzb';
case LunaIndexerIcon.DRUNKENSLUG:
return 'drunkenslug';
case LunaIndexerIcon.NZBFINDER:
return 'nzbfinder';
case LunaIndexerIcon.NZBGEEK:
return 'nzbgeek';
case LunaIndexerIcon.NZBHYDRA:
return 'nzbhydra';
case LunaIndexerIcon.NZBSU:
return 'nzbsu';
}
}

String get name {
switch (this) {
case LunaIndexerIcon.GENERIC:
Expand Down

0 comments on commit 95a645c

Please sign in to comment.