Skip to content

Commit 705febb

Browse files
committed
Update hive_services.dart
1 parent 3995d7f commit 705febb

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

lib/services/hive_services.dart

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,10 @@ class HiveHandler {
142142

143143
Future<void> deleteHistoryRequest(String id) => historyLazyBox.delete(id);
144144

145-
Future<void> clearAllHistory(WidgetRef ref) async {
146-
try {
147-
await historyMetaBox.put(kHistoryBoxIds, null);
145+
Future clearAllHistory() async {
148146
await historyMetaBox.clear();
149147
await historyLazyBox.clear();
150-
151-
// ✅ Now ref is passed correctly
152-
ref.read(selectedHistoryIdStateProvider.notifier).state = null;
153-
ref.read(selectedRequestGroupIdStateProvider.notifier).state = null;
154-
ref.read(selectedHistoryRequestModelProvider.notifier).state = null;
155-
ref.read(historySequenceProvider.notifier).state = null;
156-
ref.read(historyMetaStateNotifier.notifier).state = null;
157-
158-
} catch (e) {
159-
debugPrint("ERROR CLEARING HISTORY: $e");
160-
rethrow;
161148
}
162-
}
163-
164-
165-
166149

167150
Future clear() async {
168151
await dataBox.clear();

0 commit comments

Comments
 (0)