mod: remove in-app update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-19 13:18:56 +08:00
parent bfb0712ca7
commit 34961e5475
5 changed files with 100 additions and 102 deletions

View File

@@ -370,13 +370,13 @@ class _ExtraSettingState extends State<ExtraSetting> {
setKey: SettingBoxKey.autoClearCache,
defaultVal: false,
),
const SetSwitchItem(
title: '检查更新',
subTitle: '每次启动时检查是否需要更新',
leading: Icon(Icons.system_update_alt_outlined),
setKey: SettingBoxKey.autoUpdate,
defaultVal: false,
),
// const SetSwitchItem(
// title: '检查更新',
// subTitle: '每次启动时检查是否需要更新',
// leading: Icon(Icons.system_update_alt_outlined),
// setKey: SettingBoxKey.autoUpdate,
// defaultVal: false,
// ),
],
),
);

View File

@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:hive/hive.dart';
import 'package:PiliPalaX/utils/storage.dart';
import 'package:PiliPalaX/utils/utils.dart';
class SetSwitchItem extends StatefulWidget {
final String? title;
@@ -44,9 +43,9 @@ class _SetSwitchItemState extends State<SetSwitchItem> {
void switchChange(value) async {
val = value ?? !val;
await Setting.put(widget.setKey, val);
if (widget.setKey == SettingBoxKey.autoUpdate && value == true) {
Utils.checkUpdate();
}
// if (widget.setKey == SettingBoxKey.autoUpdate && value == true) {
// Utils.checkUpdate();
// }
if (widget.callFn != null) {
widget.callFn!.call(val);
}