Skip to content

Commit c10e063

Browse files
committed
Remove the setting of automatically redirecting to the EH site, now it is enabled by default
去除自动重定向至表站的是设置,现在会强制优先访问表站画廊链接
1 parent 5b1cf90 commit c10e063

File tree

12 files changed

+61
-126
lines changed

12 files changed

+61
-126
lines changed

.github/workflows/build_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
version: ${{ steps.get_version.outputs.version }}
5050
runs-on: ${{ matrix.os }}
5151
env:
52-
FLUTTER_VERSION: 3.13.9
52+
FLUTTER_VERSION: 3.16.5
5353
steps:
5454
# Checkout branch
5555
- name: Checkout

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ Now you can submit your PR, I'll do the remaining things. Or you can go on with:
164164

165165
1. You need to manage your Android signing by yourself,
166166
check https://docs.flutter.dev/deployment/android#signing-the-app
167+
2. Just run this project via IDEA or VSCode simply.
167168

168169
## Main Dart Dependencies
169170

README_cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ App翻译:
152152
## 项目编译相关
153153

154154
1. 你需要自己管理安卓签名文件,见https://docs.flutter.dev/deployment/android#signing-the-app
155+
2. 使用IDEA或者VSCode直接运行即可
155156

156157
## 主要dart依赖
157158

changelog/v7.4.8+147.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
- 优化保存图片时的图片命名规则
44
- 优化解压归档时的icon显示
55
- 收藏页和关注页搜索不再继承关键字
6+
- 去除自动重定向至表站的是设置,现在会强制优先访问表站画廊链接
67

78
------------------------------------------------------------------------------------------
89

910
- Fix the bug that auto reading mode cannot scroll to the end in some scenes
1011
- Optimize the toast message when canceling favorites
1112
- Optimize the image naming rules when saving images
1213
- Optimize the icon display when decompressing archives
13-
- The search in favorites and following page no longer inherits keywords
14+
- The search in favorites and following page no longer inherits keywords
15+
- Remove the setting of automatically redirecting to the EH site, now it is enabled by default

lib/src/pages/details/details_page_logic.dart

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -706,17 +706,14 @@ class DetailsPageLogic extends GetxController with LoginRequiredMixin, Scroll2To
706706
}
707707

708708
Future<Map<String, dynamic>> _getDetailsWithRedirectAndFallback({bool useCache = true}) async {
709-
final String? firstLink;
710-
final String? secondLink;
709+
final String firstLink;
710+
final String secondLink;
711711

712-
/// 1. if redirect is enabled, try EH site first for EX link
712+
/// 1. Try EH site first for EX link
713713
/// 2. if a gallery can't be found in EH site, it may be moved into EX site
714-
if (state.galleryUrl.contains(EHConsts.EXIndex) && EHSetting.redirect2Eh.isTrue) {
714+
if (state.galleryUrl.contains(EHConsts.EXIndex)) {
715715
firstLink = state.galleryUrl.replaceFirst(EHConsts.EXIndex, EHConsts.EHIndex);
716716
secondLink = state.galleryUrl;
717-
} else if (state.galleryUrl.contains(EHConsts.EXIndex) && EHSetting.redirect2Eh.isFalse) {
718-
firstLink = null;
719-
secondLink = state.galleryUrl;
720717
} else {
721718
firstLink = state.galleryUrl;
722719
secondLink = state.galleryUrl.replaceFirst(EHConsts.EHIndex, EHConsts.EXIndex);
@@ -726,7 +723,7 @@ class DetailsPageLogic extends GetxController with LoginRequiredMixin, Scroll2To
726723
if (!isEmptyOrNull(firstLink)) {
727724
try {
728725
Map<String, dynamic> galleryAndDetailAndApikey = await EHRequest.requestDetailPage<Map<String, dynamic>>(
729-
galleryUrl: firstLink!,
726+
galleryUrl: firstLink,
730727
parser: EHSpiderParser.detailPage2GalleryAndDetailAndApikey,
731728
useCacheIfAvailable: useCache,
732729
);

lib/src/pages/setting/eh/setting_eh_page.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class _SettingEHPageState extends State<SettingEHPage> {
5555
padding: const EdgeInsets.only(top: 16),
5656
children: [
5757
_buildSiteSegmentControl(),
58-
_buildRedirect2EH(),
5958
_buildUseSeparateProfile(),
6059
_buildSiteSetting(),
6160
_buildImageLimit(),
@@ -81,19 +80,6 @@ class _SettingEHPageState extends State<SettingEHPage> {
8180
);
8281
}
8382

84-
Widget _buildRedirect2EH() {
85-
if (EHSetting.site.value == 'EH') {
86-
return const SizedBox();
87-
}
88-
89-
return FadeIn(
90-
child: ListTile(
91-
title: Text('redirect2Eh'.tr),
92-
trailing: Switch(value: EHSetting.redirect2Eh.value, onChanged: EHSetting.saveRedirect2Eh),
93-
),
94-
);
95-
}
96-
9783
Widget _buildUseSeparateProfile() {
9884
return ListTile(
9985
title: Text('useSeparateProfile'.tr),

lib/src/setting/eh_setting.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import '../utils/eh_spider_parser.dart';
1313

1414
class EHSetting {
1515
static RxString site = 'EH'.obs;
16-
static RxBool redirect2Eh = true.obs;
1716
static Rx<LoadingState> refreshState = LoadingState.idle.obs;
1817
static RxInt currentConsumption = (-1).obs;
1918
static RxInt totalLimit = 5000.obs;
@@ -80,12 +79,6 @@ class EHSetting {
8079
SiteSetting.refresh();
8180
}
8281

83-
static saveRedirect2Eh(bool redirect2Eh) {
84-
Log.debug('saveRedirect2Eh:$redirect2Eh');
85-
EHSetting.redirect2Eh.value = redirect2Eh;
86-
_save();
87-
}
88-
8982
static saveTotalLimit(int totalLimit) {
9083
Log.debug('saveTotalLimit:$totalLimit');
9184
EHSetting.totalLimit.value = totalLimit;
@@ -106,14 +99,12 @@ class EHSetting {
10699
static Map<String, dynamic> _toMap() {
107100
return {
108101
'site': site.value,
109-
'redirect2Eh': redirect2Eh.value,
110102
'totalLimit': totalLimit.value,
111103
};
112104
}
113105

114106
static _initFromMap(Map<String, dynamic> map) {
115107
site.value = map['site'];
116-
redirect2Eh.value = map['redirect2Eh'] ?? redirect2Eh.value;
117108
totalLimit.value = map['totalLimit'];
118109
}
119110
}

0 commit comments

Comments
 (0)