Skip to content

Commit

Permalink
Fix any bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Apr 30, 2022
1 parent b7b21bb commit 0e36ddb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.2.1
v1.2.2
5 changes: 1 addition & 4 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
建议更新, 修复严重bug.

- 修复漫画列表无限加载的问题, 如果正在使用软件, 建议尽快更新 防止软件或ip被ban

修复一些BUG
7 changes: 4 additions & 3 deletions lib/basic/methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class Methods {
static HttpClient httpClient = HttpClient();

Future<String> _invoke(String method, dynamic params) async {


late String resp;
if (Platform.isLinux) {
var req = await httpClient.post("127.0.0.1", 52764, "invoke");
Expand Down Expand Up @@ -275,10 +273,13 @@ class Methods {
.cast<DlImage>();
}

/// 创建下载
Future<dynamic> deleteDownload(int id) async {
return _invoke("delete_download", id);
}

Future<dynamic> renewAllDownloads() async {
return _invoke("renew_all_downloads", "");
}
}

class _Response {
Expand Down
11 changes: 11 additions & 0 deletions lib/screens/downloads_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ class _DownloadsScreenState extends State<DownloadsScreen> {
return Scaffold(
appBar: AppBar(
title: const Text("下载列表"),
actions: [
IconButton(
onPressed: () async {
await methods.renewAllDownloads();
setState(() {
_downloadsFuture = methods.allDownloads();
});
},
icon: const Icon(Icons.autorenew),
),
],
),
body: ContentBuilder(
future: _downloadsFuture,
Expand Down

0 comments on commit 0e36ddb

Please sign in to comment.