Add reconnect and animations to connection button

This commit is contained in:
problematicconsumer
2024-03-07 19:17:05 +03:30
parent 70123d80a8
commit be1c1bb580
3 changed files with 83 additions and 53 deletions

View File

@@ -24,7 +24,7 @@ class ConfigOptionNotifier extends _$ConfigOptionNotifier with AppLogger {
if (next case AsyncData(:final value) when next != previous) {
if (_lastUpdate == null ||
DateTime.now().difference(_lastUpdate!) >
const Duration(seconds: 3)) {
const Duration(milliseconds: 100)) {
_lastUpdate = DateTime.now();
state = AsyncData(value != serviceSingboxOptions);
}