Skip to content

Commit

Permalink
feat: "all" extension on top
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush2622 committed Feb 6, 2025
1 parent 2e6c613 commit b7fc508
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Screens/Extensions/ExtensionList.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class _ExtensionScreenState extends ConsumerState<Extension> {

List<Source> _getNotInstalledEntries(List<Source> data) {
return data
.where((element) => element.version == element.versionLast!)
.where((element) => !element.isAdded!)
.toList();
}
Expand Down Expand Up @@ -260,15 +259,19 @@ class _ExtensionScreenState extends ConsumerState<Extension> {
child: Row(
children: [
Text(
groupByValue,
groupByValue.toUpperCase(),
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 13),
),
],
),
),
itemBuilder: (context, Source element) =>
ExtensionListTileWidget(source: element),
groupComparator: (group1, group2) => group1.compareTo(group2),
groupComparator: (group1, group2) {
if (group1 == "all") return -1;
if (group2 == "all") return 1;
return group1.compareTo(group2);
},
itemComparator: (item1, item2) => item1.name!.compareTo(item2.name!),
order: GroupedListOrder.ASC,
);
Expand Down

0 comments on commit b7fc508

Please sign in to comment.