chore: set locally cached value for if user saw activity menu dropdown to false on logout
This commit is contained in:
parent
1e6cabc5d8
commit
06cfc6a271
1 changed files with 15 additions and 0 deletions
|
|
@ -7,8 +7,10 @@ import 'package:get_storage/get_storage.dart';
|
|||
import 'package:matrix/matrix.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/get_analytics_controller.dart';
|
||||
import 'package:fluffychat/pangea/analytics_misc/put_analytics_controller.dart';
|
||||
import 'package:fluffychat/pangea/bot/utils/bot_room_extension.dart';
|
||||
|
|
@ -131,6 +133,19 @@ class PangeaController {
|
|||
if (exclude.contains(key)) continue;
|
||||
futures.add(GetStorage(key).erase());
|
||||
}
|
||||
|
||||
if (AppConfig.showedActivityMenu) {
|
||||
futures.add(
|
||||
SharedPreferences.getInstance().then((prefs) async {
|
||||
AppConfig.showedActivityMenu = false;
|
||||
prefs.setBool(
|
||||
SettingKeys.showedActivityMenu,
|
||||
AppConfig.showedActivityMenu,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
await Future.wait(futures);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue