From 935e6d58339cc63da96ae66ae96bfeacbdc647e1 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 30 Nov 2025 17:24:27 +0800 Subject: [PATCH] :lipstick: Logout now will clear database to avoid wrong state --- lib/screens/account.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/screens/account.dart b/lib/screens/account.dart index a6062d1e..8dae1b04 100644 --- a/lib/screens/account.dart +++ b/lib/screens/account.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:gap/gap.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:island/pods/message.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/userinfo.dart'; import 'package:island/screens/notification.dart'; @@ -470,6 +471,7 @@ class AccountScreen extends HookConsumerWidget { final apiClient = ref.watch(apiClientProvider); showLoadingModal(context); await apiClient.delete('/pass/accounts/me/sessions/current'); + await resetDatabase(ref); if (!context.mounted) return; hideLoadingModal(context); final userNotifier = ref.read(userInfoProvider.notifier);