Skip to content

Commit

Permalink
v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
niuhuan committed Aug 19, 2022
1 parent 17eaeb8 commit 1b63c6f
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ci/version.code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.2
v1.1.3
15 changes: 5 additions & 10 deletions ci/version.info.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
v1.1.3

- [x] 长按下载可以删除
- [x] 流式翻页器也可以下载

v1.1.2

- [x] 升级flutter到3.0.5
- [x] TG群炸了, 换成新的, 在这里通知一下
- [x] 更新发电功能, 点击小闪电点我发过电, 没有捐赠过的用户发电到8月

v1.x

- [x] 下载缓存漫画, 多线程
- [x] 发电
- [x] 一次推送了大量代码, 如有BUG请及时反馈

v0.0.5

- [x] 安卓可以在设置中开启音量键翻页
9 changes: 9 additions & 0 deletions lib/basic/methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,13 @@ class Methods {
.value
.toInt();
}

Future deleteDownloadById($fixnum.Int64 comicId) {
return _flatInvoke(
"deleteDownloadById",
IntValue(
value: comicId,
),
);
}
}
38 changes: 37 additions & 1 deletion lib/screens/components/comic_pager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,43 @@ class _StreamPagerState extends State<_StreamPager> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("已加载 ${_nextPage - 1} / $_maxPage 页"),
Expanded(child: Container()),
GestureDetector(
onTap: () {
if (_selected == null) {
_selected = [];
setState(() {});
} else {
_selected = null;
setState(() {});
}
},
child: const Text("选择"),
),
const Text(
" / ",
style: TextStyle(color: Colors.grey),
),
GestureDetector(
onTap: () async {
if (_selected != null) {
if (!isPro) {
defaultToast(context, "发电才能批量下载");
return;
}
await methods.pushToDownloads(_selected!);
defaultToast(context, "已经加入下载队列");
_selected = null;
setState(() {});
}
},
child: Text(
"下载",
style: TextStyle(
color: _selected == null ? Colors.grey : null,
),
),
),
],
),
),
Expand Down Expand Up @@ -379,7 +416,6 @@ class _PagerPagerState extends State<_PagerPager> {
return;
}
await methods.pushToDownloads(_selected!);
// todo 下载
defaultToast(context, "已经加入下载队列");
_selected = null;
setState(() {});
Expand Down
14 changes: 14 additions & 0 deletions lib/screens/downloads_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ class _DownloadsScreenState extends State<DownloadsScreen> {
}));
}
},
onLongPress: () async {
String? result = await chooseListDialog<String>(
context,
title: "删除漫画 ${e.title}?",
values: ["是", "否"],
);
if (result == "是") {
await methods.deleteDownloadById(e.id);
setState(() {
_future = methods.downloads();
_key = UniqueKey();
});
}
},
child: DownloadInfoCard(e),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.2+3
version: 1.1.3+4

environment:
sdk: ">=2.16.1 <3.0.0"
Expand Down

0 comments on commit 1b63c6f

Please sign in to comment.