mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 23:22:07 +00:00
fix
This commit is contained in:
parent
5905480392
commit
b581d9dc1c
1 changed files with 26 additions and 3 deletions
|
|
@ -1150,7 +1150,16 @@ class _LibraryScreenState extends ConsumerState<LibraryScreen>
|
|||
child: Builder(
|
||||
builder: (context) {
|
||||
if (snapshot.hasData && snapshot.data!.isNotEmpty) {
|
||||
final entries = snapshot.data!;
|
||||
final data = snapshot.data!;
|
||||
data.sort(
|
||||
(a, b) => (a.pos ?? 0).compareTo(b.pos ?? 0),
|
||||
);
|
||||
|
||||
final entries =
|
||||
data.where((e) => e.hide ?? false).toList();
|
||||
if (entries.isEmpty) {
|
||||
return Text(l10n.library_no_category_exist);
|
||||
}
|
||||
return SuperListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: entries.length,
|
||||
|
|
@ -1192,7 +1201,14 @@ class _LibraryScreenState extends ConsumerState<LibraryScreen>
|
|||
onPressed: () {
|
||||
context.push(
|
||||
"/categories",
|
||||
extra: (true, widget.itemType),
|
||||
extra: (
|
||||
true,
|
||||
widget.itemType == ItemType.manga
|
||||
? 0
|
||||
: widget.itemType == ItemType.anime
|
||||
? 1
|
||||
: 2,
|
||||
),
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
|
@ -1259,7 +1275,14 @@ class _LibraryScreenState extends ConsumerState<LibraryScreen>
|
|||
onPressed: () {
|
||||
context.push(
|
||||
"/categories",
|
||||
extra: (true, widget.itemType),
|
||||
extra: (
|
||||
true,
|
||||
widget.itemType == ItemType.manga
|
||||
? 0
|
||||
: widget.itemType == ItemType.anime
|
||||
? 1
|
||||
: 2,
|
||||
),
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue