Skip to content

Commit

Permalink
♻️ categories sort persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Apr 28, 2024
1 parent de4a2f8 commit 8f3ffbc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v1.7.10
- [x] ♻️ 代理支持HTTP协议
- [x] ✨ 对分类进行排序(设置项)

v1.7.9
- [x] ✨ 下载批量删除
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/CategoriesScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _CategoriesScreenState extends State<CategoriesScreen> {
void dispose() {
shadowCategoriesEvent.unsubscribe(_onShadowChange);
categoriesColumnCountEvent.unsubscribe(_setState);
categoriesSortEvent.subscribe(_onShadowChange);
categoriesSortEvent.unsubscribe(_onShadowChange);
super.dispose();
}

Expand Down
13 changes: 13 additions & 0 deletions lib/screens/CategoriesSortScreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ class _CategoriesSortPanelState extends State<CategoriesSortPanel> {
return Scaffold(
appBar: AppBar(
title: const Text('分类排序'),
actions: [
_saveIcon(),
],
),
body: PikaListView(
children: [
Expand Down Expand Up @@ -284,4 +287,14 @@ class _CategoriesSortPanelState extends State<CategoriesSortPanel> {

return items;
}

Widget _saveIcon() {
return IconButton(
onPressed: () async {
await saveCategoriesSort(_categoriesSort);
Navigator.of(context).pop();
},
icon: const Icon(Icons.save),
);
}
}

0 comments on commit 8f3ffbc

Please sign in to comment.