mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: remove in-app update
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user