Skip to content

Commit

Permalink
修复投票或者收藏tag错误时无法重试的bug
Browse files Browse the repository at this point in the history
修复初始化cookie的bug
jiangtian616 committed Apr 12, 2022
1 parent df068e4 commit a74f09c
Showing 5 changed files with 209 additions and 204 deletions.
4 changes: 2 additions & 2 deletions lib/src/network/eh_request.dart
Original file line number Diff line number Diff line change
@@ -54,8 +54,8 @@ class EHRequest {
await Future.wait(
EHConsts.host2Ip.entries.map(
(entry) => Future.wait([
_cookieJar.loadForRequest(Uri.parse(entry.key)),
_cookieJar.loadForRequest(Uri.parse(entry.value)),
_cookieJar.loadForRequest(Uri.parse('https://${entry.key}')),
_cookieJar.loadForRequest(Uri.parse('https://${entry.value}')),
]),
),
);
1 change: 1 addition & 0 deletions lib/src/pages/read/read_page.dart
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ import 'package:jhentai/src/utils/size_util.dart';
import 'package:jhentai/src/widget/eh_image.dart';
import 'package:jhentai/src/widget/icon_text_button.dart';
import 'package:jhentai/src/widget/loading_state_indicator.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';

import '../../service/download_service.dart';
10 changes: 7 additions & 3 deletions lib/src/widget/eh_tag.dart
Original file line number Diff line number Diff line change
@@ -141,30 +141,34 @@ class _TagDialogState extends State<_TagDialog> {
child: Icon(Icons.thumb_up, color: Colors.green.shade700),
),
successWidget: const DoneWidget(),
errorTapCallback: () => _vote(true),
),
LoadingStateIndicator(
loadingState: voteDownState,
idleWidget: GestureDetector(
onTap: () => _vote(false),
child: Icon(Icons.thumb_down, color: Colors.red.shade700),
),
successWidget: DoneWidget(),
successWidget: const DoneWidget(),
errorTapCallback: () => _vote(false),
),
LoadingStateIndicator(
loadingState: addWatchedTagState,
idleWidget: GestureDetector(
onTap: () => _addNewTagSet(true),
child: Icon(Icons.favorite, color: Get.theme.primaryColorLight),
),
successWidget: DoneWidget(),
successWidget: const DoneWidget(),
errorTapCallback: () => _addNewTagSet(true),
),
LoadingStateIndicator(
loadingState: addHiddenTagState,
idleWidget: GestureDetector(
onTap: () => _addNewTagSet(false),
child: Icon(Icons.visibility_off, color: Colors.grey.shade700),
),
successWidget: DoneWidget(),
successWidget: const DoneWidget(),
errorTapCallback: () => _addNewTagSet(false),
),
if (widget.tagData.tagName != null)
GestureDetector(
396 changes: 198 additions & 198 deletions pubspec.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: jhentai
description: A flutter app for E-Hentai/EXHentai

publish_to: 'none'
version: 1.0.0+1
version: 1.1.0+2

environment:
sdk: ">=2.16.1 <3.0.0"

0 comments on commit a74f09c

Please sign in to comment.