mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 19:51:11 +08:00
tweaks (#1780)
* opt: sized * fix: self send * feat: ctrl enter to send * opt: checked * opt: download notifier * opt: Future.syncValue * mod: account * mod: loading state * opt: DebounceStreamMixin * opt: report * opt: enum map * opt: file handler * opt: dyn color * opt: Uint8List subview * opt: FileExt * opt: computeLuminance * opt: isNullOrEmpty * opt: Get context * update [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * opt dynamicColor [skip ci] Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * fixes [skip ci] * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com> Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
02e0d34127
commit
ce5e85e64b
@@ -669,7 +669,7 @@ List<SettingsModel> get styleSettings => [
|
||||
),
|
||||
NormalModel(
|
||||
onTap: (context, setState) async {
|
||||
final double? result = await Get.toNamed('/fontSizeSetting');
|
||||
final result = await Get.toNamed('/fontSizeSetting');
|
||||
if (result != null) {
|
||||
Get.put(ColorSelectController()).currentTextScale.value = result;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:PiliPlus/common/widgets/color_palette.dart';
|
||||
import 'package:PiliPlus/main.dart' show MyApp;
|
||||
import 'package:PiliPlus/models/common/nav_bar_config.dart';
|
||||
import 'package:PiliPlus/models/common/theme/theme_color_type.dart';
|
||||
import 'package:PiliPlus/models/common/theme/theme_type.dart';
|
||||
@@ -163,19 +166,23 @@ class _ColorSelectPageState extends State<ColorSelectPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => CheckboxListTile(
|
||||
title: const Text('动态取色'),
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
value: ctr.dynamicColor.value,
|
||||
onChanged: (val) {
|
||||
ctr
|
||||
..dynamicColor.value = val!
|
||||
..setting.put(SettingBoxKey.dynamicColor, val);
|
||||
Get.forceAppUpdate();
|
||||
},
|
||||
if (!Platform.isIOS)
|
||||
Obx(
|
||||
() => CheckboxListTile(
|
||||
title: const Text('动态取色'),
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
value: ctr.dynamicColor.value,
|
||||
onChanged: (val) async {
|
||||
ctr
|
||||
..dynamicColor.value = val!
|
||||
..setting.put(SettingBoxKey.dynamicColor, val);
|
||||
if (val) {
|
||||
await MyApp.initPlatformState();
|
||||
}
|
||||
Get.forceAppUpdate();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: padding,
|
||||
child: AnimatedSize(
|
||||
|
||||
@@ -14,7 +14,6 @@ import 'package:PiliPlus/pages/setting/widgets/multi_select_dialog.dart';
|
||||
import 'package:PiliPlus/pages/webdav/view.dart';
|
||||
import 'package:PiliPlus/utils/accounts.dart';
|
||||
import 'package:PiliPlus/utils/accounts/account.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
import 'package:PiliPlus/utils/extension/size_ext.dart';
|
||||
import 'package:flutter/material.dart' hide ListTile;
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -223,9 +222,9 @@ class _SettingPageState extends State<SettingPage> {
|
||||
);
|
||||
},
|
||||
);
|
||||
if (!context.mounted || result.isNullOrEmpty) return;
|
||||
if (!context.mounted || result == null || result.isEmpty) return;
|
||||
Future<void> logout() {
|
||||
_noAccount.value = result!.length == Accounts.account.length;
|
||||
_noAccount.value = result.length == Accounts.account.length;
|
||||
return Accounts.deleteAll(result);
|
||||
}
|
||||
|
||||
@@ -236,7 +235,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
return AlertDialog(
|
||||
title: const Text('提示'),
|
||||
content: Text(
|
||||
"确认要退出以下账号登录吗\n\n${result!.map((i) => i.mid.toString()).join('\n')}",
|
||||
"确认要退出以下账号登录吗\n\n${result.map((i) => i.mid.toString()).join('\n')}",
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
|
||||
Reference in New Issue
Block a user