2a35fe5532
- Collapsible search in notes and tasks: magnifying glass in AppBar expands to a text field inline; close button resets the filter - Offline capture queue: failed quick-captures (NetworkException) are persisted to SharedPreferences and retried automatically on next successful submit or app start; badge shows pending count - App icon: book-with-sparkle logo from FabledAssistant SVG rendered at all Android densities with adaptive icon (indigo #6366f1 bg) - Dark mode subtitle fix: use colorScheme.onSurfaceVariant for note preview and conversation timestamp text - Remove swipe-to-delete (accidental deletions); long-press remains - Chat: SSE streaming reliability, polling fallback, title patching - Settings: theme toggle (system/light/dark) persisted to prefs - Notes: delete button in edit screen; body preview in list - Tasks: fix delete dialog context; description search support Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
878 B
Dart
30 lines
878 B
Dart
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
import 'settings_provider.dart';
|
|
|
|
final captureQueueProvider =
|
|
StateNotifierProvider<CaptureQueueNotifier, List<String>>(
|
|
(ref) => CaptureQueueNotifier(ref.watch(sharedPreferencesProvider)),
|
|
);
|
|
|
|
class CaptureQueueNotifier extends StateNotifier<List<String>> {
|
|
static const _key = 'capture_queue';
|
|
final SharedPreferences _prefs;
|
|
|
|
CaptureQueueNotifier(this._prefs)
|
|
: super(_prefs.getStringList(_key) ?? []);
|
|
|
|
Future<void> enqueue(String text) async {
|
|
final updated = [...state, text];
|
|
await _prefs.setStringList(_key, updated);
|
|
state = updated;
|
|
}
|
|
|
|
Future<void> dequeue(String text) async {
|
|
final updated = List<String>.from(state)..remove(text);
|
|
await _prefs.setStringList(_key, updated);
|
|
state = updated;
|
|
}
|
|
}
|