fixed client-reported crashes in the pdf viewer, image picker and prosemirror images, mapped webdav errors to user messages and hardened keychain, cache and push stores against io failures
This commit is contained in:
1 parent
c5592f117b
commit
23e4510bf8
19 files changed
+545
-55
No files matched your search
+10
-2
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:localstore/localstore.dart';
|
||||
|
||||
/// A rendered notification's bookkeeping, keyed by the Nextcloud notification
|
||||
@@ -40,8 +41,15 @@ class NidStore {
|
||||
|
||||
NidStore({Localstore? db}) : _db = db ?? Localstore.instance;
|
||||
|
||||
Future<void> put(NidEntry entry) =>
|
||||
_db.collection(_collection).doc('${entry.nid}').set(entry.toJson());
|
||||
/// Best effort: a full disk must not keep the notification itself from
|
||||
/// being shown — only a later delete-push would then miss the mapping.
|
||||
Future<void> put(NidEntry entry) async {
|
||||
try {
|
||||
await _db.collection(_collection).doc('${entry.nid}').set(entry.toJson());
|
||||
} on Object catch (e) {
|
||||
debugPrint('NidStore.put(${entry.nid}) failed: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<NidEntry?> get(int nid) async {
|
||||
final data = await _db.collection(_collection).doc('$nid').get();
|
||||
|
||||
Reference in new issue
Block a user