fix: Settings crash, photo preview before sending, incoming-content hardening
Settings crashed with a TypeError: the profile card passed a SepotFingerprint object where the localized string formatter expects a String (hidden behind a `dynamic` parameter). Also fixes RangeError in avatar initials (empty names, double spaces) and switches initials to grapheme clusters so emoji don't get split. New photo preview screen: a captured or picked photo no longer sends immediately — it opens in a preview with freehand drawing (7 colours, undo), draggable text overlay, 90° rotation and a caption field. Nothing leaves the device until Send is tapped. Incoming-content hardening: decryption and content processing are now separated in the delivery path. Once an envelope is decrypted the ratchet has advanced, so redelivery can never help — permanently malformed content (FormatException/TypeError) is acked and dropped instead of poisoning the queue on every reconnect. Attachment metadata now validates base64 of the crypto fields up front, and a corrupt inline thumbnail no longer breaks bubble rendering. PNG without real transparency (screenshots, edited photos) is now re-encoded as JPEG — several times smaller on the wire. Tests: 116 (new widget tests for Settings and the photo preview, AttachmentMeta wire validation).
This commit is contained in:
+37
-1
@@ -1698,5 +1698,41 @@
|
||||
"commonE2eBadgeFull": "End-to-end šifrováno",
|
||||
"@commonE2eBadgeFull": {
|
||||
"description": "Plná varianta badge šifrování (ikona zámku + text), zobrazuje se např. v hlavičce chatu / onboardingu."
|
||||
},
|
||||
"photoPreviewCaptionHint": "Přidat popisek…",
|
||||
"@photoPreviewCaptionHint": {
|
||||
"description": "hintText pole popisku na obrazovce náhledu fotky před odesláním"
|
||||
},
|
||||
"photoPreviewDraw": "Kreslit",
|
||||
"@photoPreviewDraw": {
|
||||
"description": "Tooltip nástroje kreslení prstem na náhledu fotky"
|
||||
},
|
||||
"photoPreviewAddText": "Přidat text",
|
||||
"@photoPreviewAddText": {
|
||||
"description": "Tooltip nástroje přidání textu na fotku"
|
||||
},
|
||||
"photoPreviewRotate": "Otočit",
|
||||
"@photoPreviewRotate": {
|
||||
"description": "Tooltip otočení fotky o 90°"
|
||||
},
|
||||
"photoPreviewUndo": "Zpět",
|
||||
"@photoPreviewUndo": {
|
||||
"description": "Tooltip vrácení posledního tahu kreslení"
|
||||
},
|
||||
"photoPreviewSend": "Poslat",
|
||||
"@photoPreviewSend": {
|
||||
"description": "Tooltip tlačítka odeslání fotky z náhledu"
|
||||
},
|
||||
"photoPreviewTextDialogTitle": "Text na fotce",
|
||||
"@photoPreviewTextDialogTitle": {
|
||||
"description": "Titulek dialogu pro zadání/úpravu textu na fotce"
|
||||
},
|
||||
"photoPreviewRemoveText": "Odebrat",
|
||||
"@photoPreviewRemoveText": {
|
||||
"description": "Tlačítko odebrání textu z fotky v dialogu úpravy"
|
||||
},
|
||||
"photoPreviewDecodeFailed": "Fotku se nepodařilo načíst",
|
||||
"@photoPreviewDecodeFailed": {
|
||||
"description": "SnackBar, když se vybraná fotka nedá dekódovat — náhled se zavře bez odeslání"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user