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:
MineTec committed 2026-10-12 17:00:14 +02:00
1 parent c5592f117b
commit 23e4510bf8
19 files changed
+545 -55

No files matched your search

+10 -2
View File
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:localstore/localstore.dart';
/// Maximum messages kept per chat thread — enough for a messenger-style
@@ -190,8 +191,15 @@ class ChatThreadStore {
DocumentRef _doc(String chatToken) =>
_db.collection(_collection).doc(docIdForToken(chatToken));
Future<void> _write(String chatToken, List<ThreadMessage> messages) =>
_doc(chatToken).set({
/// Best effort: a full disk must not keep the notification from being
/// shown; the thread just restarts from the next push.
Future<void> _write(String chatToken, List<ThreadMessage> messages) async {
try {
await _doc(chatToken).set({
'messages': [for (final m in messages) m.toJson()],
});
} on Object catch (e) {
debugPrint('ChatThreadStore.write($chatToken) failed: $e');
}
}
}