mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
rm: refresh key (#291)
This commit is contained in:
@@ -149,8 +149,6 @@ class ServerProvider extends ChangeNotifier {
|
||||
return await _getData(s.spi);
|
||||
}
|
||||
|
||||
static final refreshKey = GlobalKey<RefreshIndicatorState>();
|
||||
|
||||
Future<void> startAutoRefresh() async {
|
||||
var duration = Stores.setting.serverStatusUpdateInterval.fetch();
|
||||
stopAutoRefresh();
|
||||
@@ -159,7 +157,6 @@ class ServerProvider extends ChangeNotifier {
|
||||
duration = 3;
|
||||
Loggers.app.warning('Invalid duration: $duration, use default 3');
|
||||
}
|
||||
refreshKey.currentState?.show();
|
||||
_timer = Timer.periodic(Duration(seconds: duration), (_) async {
|
||||
await refresh();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user