Skip to content

Commit

Permalink
v8.0.6+271
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed Dec 12, 2024
1 parent 09687f2 commit b5b81b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/v8.0.6+271.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- 优化双击返回逻辑

--------------------

- Optimize double-click return logic
7 changes: 5 additions & 2 deletions lib/src/widget/will_pop_interceptor.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:jhentai/src/pages/home_page.dart';
import 'package:jhentai/src/setting/style_setting.dart';
Expand All @@ -22,15 +25,15 @@ class _WillPopInterceptorState extends State<WillPopInterceptor> {
Widget build(BuildContext context) {
return PopScope(
child: widget.child,
canPop: false,
canPop: Platform.isAndroid ? false : true,
onPopInvokedWithResult: (bool didPop, FormData? result) async {
if (didPop) {
return;
}

final bool shouldPop = await _handlePopApp();
if (context.mounted && shouldPop) {
Navigator.pop(context, result);
SystemNavigator.pop(animated: true);
}
},
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: jhentai
description: A flutter app for E-Hentai/EXHentai

publish_to: 'none'
version: 8.0.6+270
version: 8.0.6+271

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down

0 comments on commit b5b81b0

Please sign in to comment.