optimize checkUpdate

This commit is contained in:
chen08209
2024-05-31 09:59:18 +08:00
parent fd3040283c
commit 3ba86dc9c2
12 changed files with 182 additions and 49 deletions

View File

@@ -158,18 +158,25 @@ class GlobalState {
required String title,
required InlineSpan message,
Function()? onTab,
String? confirmText,
}) {
showCommonDialog(
child: Builder(
builder: (context) {
return AlertDialog(
title: Text(title),
content: SizedBox(
content: Container(
width: 300,
child: RichText(
text: TextSpan(
style: Theme.of(context).textTheme.labelLarge,
children: [message],
constraints: const BoxConstraints(
maxHeight: 200
),
child: SingleChildScrollView(
child: RichText(
overflow: TextOverflow.visible,
text: TextSpan(
style: Theme.of(context).textTheme.labelLarge,
children: [message],
),
),
),
),
@@ -179,7 +186,7 @@ class GlobalState {
() {
Navigator.of(context).pop();
},
child: Text(appLocalizations.confirm),
child: Text(confirmText ?? appLocalizations.confirm),
)
],
);
@@ -200,6 +207,7 @@ class GlobalState {
filter: filter,
);
}
updateTraffic({
AppState? appState,
required Config config,