mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
opt: escape performReassemble (#1864)
This commit is contained in:
committed by
GitHub
parent
96f9972895
commit
aee4424dbf
@@ -42,7 +42,7 @@ import 'package:PiliPlus/utils/update.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/material.dart' hide RefreshIndicator;
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -972,7 +972,7 @@ Future<void> _showRefreshDragDialog(
|
||||
if (res != null) {
|
||||
kDragContainerExtentPercentage = res;
|
||||
await GStorage.setting.put(SettingBoxKey.refreshDragPercentage, res);
|
||||
Get.forceAppUpdate();
|
||||
setState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,7 +993,19 @@ Future<void> _showRefreshDialog(
|
||||
if (res != null) {
|
||||
displacement = res;
|
||||
await GStorage.setting.put(SettingBoxKey.refreshDisplacement, res);
|
||||
Get.forceAppUpdate();
|
||||
if (WidgetsBinding.instance.rootElement case final context?) {
|
||||
context.visitChildElements(_visitor);
|
||||
}
|
||||
setState();
|
||||
}
|
||||
}
|
||||
|
||||
void _visitor(Element context) {
|
||||
if (!context.mounted) return;
|
||||
if (context.widget is RefreshIndicator) {
|
||||
context.markNeedsBuild();
|
||||
} else {
|
||||
context.visitChildren(_visitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user