@@ -20,21 +20,23 @@ class Extensions {
20
20
static final novelRepo = '' .obs;
21
21
22
22
static Future <void > init () async {
23
- animeRepo.value = loadCustomData ('animeRepo' ) ?? '' ;
24
- mangaRepo.value = loadCustomData ('mangaRepo' ) ?? '' ;
25
- novelRepo.value = loadCustomData ('novelRepo' ) ?? '' ;
23
+ try {
24
+ animeRepo.value = loadCustomData ('animeRepo' ) ?? '' ;
25
+ mangaRepo.value = loadCustomData ('mangaRepo' ) ?? '' ;
26
+ novelRepo.value = loadCustomData ('novelRepo' ) ?? '' ;
26
27
27
- await Future .wait ([
28
- if (animeRepo.value.isNotEmpty)
29
- _provider.read (
30
- fetchAnimeSourcesListProvider (id: null , reFresh: false ).future),
31
- if (mangaRepo.value.isNotEmpty)
32
- _provider.read (
33
- fetchMangaSourcesListProvider (id: null , reFresh: false ).future),
34
- if (novelRepo.value.isNotEmpty)
35
- _provider.read (
36
- fetchNovelSourcesListProvider (id: null , reFresh: false ).future),
37
- ]);
28
+ await Future .wait ([
29
+ if (animeRepo.value.isNotEmpty)
30
+ _provider.read (
31
+ fetchAnimeSourcesListProvider (id: null , reFresh: false ).future),
32
+ if (mangaRepo.value.isNotEmpty)
33
+ _provider.read (
34
+ fetchMangaSourcesListProvider (id: null , reFresh: false ).future),
35
+ if (novelRepo.value.isNotEmpty)
36
+ _provider.read (
37
+ fetchNovelSourcesListProvider (id: null , reFresh: false ).future),
38
+ ]);
39
+ } catch (_) {}
38
40
}
39
41
40
42
static Future <void > refresh (ItemType itemType) async {
@@ -68,6 +70,7 @@ class Extensions {
68
70
}
69
71
70
72
static Future <void > setRepo (ItemType itemType, String repo) async {
73
+
71
74
if (itemType == ItemType .manga) {
72
75
mangaRepo.value = repo;
73
76
saveCustomData ('mangaRepo' , repo);
0 commit comments