File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -142,27 +142,10 @@ class HiveHandler {
142
142
143
143
Future <void > deleteHistoryRequest (String id) => historyLazyBox.delete (id);
144
144
145
- Future <void > clearAllHistory (WidgetRef ref) async {
146
- try {
147
- await historyMetaBox.put (kHistoryBoxIds, null );
145
+ Future clearAllHistory () async {
148
146
await historyMetaBox.clear ();
149
147
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 ;
161
148
}
162
- }
163
-
164
-
165
-
166
149
167
150
Future clear () async {
168
151
await dataBox.clear ();
You can’t perform that action at this time.
0 commit comments