Merge origin/dev into feat/bookmarks-ux-improvements
This commit is contained in:
commit
54ba703213
60 files changed
+2983
-1069
No files matched your search
@@ -61,9 +61,9 @@ A list of nodes heard passively over the air but not yet added as contacts. Each
|
||||
## Compression (SMAZ and Cyr2Lat)
|
||||
|
||||
### Where to Find It
|
||||
Every open direct-message and channel chat shows **Compression: Off**, **Compression: SMAZ** or **Compression: Cyr2Lat** in a strip just below the app bar, above the messages. Tap it to open one sheet with the three choices and what each does. The choice applies to that contact or channel only and is saved on the phone, so it can be changed while the radio is offline. A channel that has not synced from the radio yet has no saved identity, so the strip is disabled and says why.
|
||||
The top-right menu of every direct-message and channel chat has a **Compression: Off**, **Compression: SMAZ** or **Compression: Cyr2Lat** item. Tap it to open a Compression page with the three choices and a short note on each. The choice applies to that contact or channel only and is saved on the phone, so it can be changed while the radio is offline. A channel that has not synced from the radio yet has no saved identity, so the choices are disabled and the page says why.
|
||||
|
||||
Only one mode is active per chat. Choosing SMAZ turns Cyr2Lat off and the other way round. Off and SMAZ close the sheet once saved; Cyr2Lat keeps it open to show its profile picker. If saving fails, the sheet says so and keeps showing the saved choice.
|
||||
Only one mode is active per chat. Choosing SMAZ turns Cyr2Lat off and the other way round. Cyr2Lat shows its profile picker on the same page. If saving fails, the page says so and keeps showing the saved choice.
|
||||
|
||||
### Off
|
||||
Sends your text exactly as typed. Every app can read it.
|
||||
|
||||
@@ -82,9 +82,9 @@ Tap a channel card to open the channel chat screen.
|
||||
- Overflow menu (⋮) → **Bookmarks**: opens the **Bookmarks** screen scoped to this channel, with a split pill at the top to switch between **All** and `#channel` (plus in-screen search, copy, and single or bulk removal with confirmation).
|
||||
- Overflow menu (⋮) → **Chat background**: a color or picture, with a fade slider, behind this channel only. See [Chat backgrounds](themes.md#chat-backgrounds). Holiday greetings in new messages play a short animation, as in [direct chat](chat-and-messaging.md#message-list)
|
||||
|
||||
### Compression Strip
|
||||
### Compression
|
||||
|
||||
Below the app bar, above the messages, the same strip as in [direct chats](chat-and-messaging.md#compression-strip) shows and changes this channel's compression: Off, SMAZ or Cyr2Lat. It is stored with the channel's key, so every slot holding that channel shares it, and it can be changed offline. Until the channel has synced from the radio the strip is disabled and says why. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
The top-right menu has the same Compression item as [direct chats](chat-and-messaging.md#compression); it shows and changes this channel's compression: Off, SMAZ or Cyr2Lat. It is stored with the channel's key, so every slot holding that channel shares it, and it can be changed offline. Until the channel has synced from the radio the choices are disabled and the page says why. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
|
||||
### Message Display
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ From the Contacts screen, tap any Chat-type contact to open the ChatScreen.
|
||||
- **Search** (magnifier icon): Replaces the title with a search field and lists every message in this conversation's full history whose text (or translation) contains the typed word, newest first, with matches highlighted. Channel search also matches sender names and skips messages caught by the [message filter](message-filter.md). Back, Esc or the arrow closes search. Channel chats have the same button.
|
||||
- **Overflow menu** (⋮ icon): Contains Routing, Info, Bookmarks, Telemetry, Settings (link images and telemetry permissions), Chat background, Clear Chat, and Remove from contacts (rooms also have Room Server Management). Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. Chat background sets a color or picture (with a fade slider) behind this chat only; see [Chat backgrounds](themes.md#chat-backgrounds).
|
||||
|
||||
### Compression Strip
|
||||
### Compression
|
||||
|
||||
Below the app bar, above the messages, a strip shows **Compression: Off**, **SMAZ** or **Cyr2Lat** for this contact. Tap it to choose a mode in one sheet that explains each: SMAZ is lossless but needs a SMAZ-aware app on the other end and is only used when it makes a message smaller; Cyr2Lat swaps some Cyrillic letters for lookalike Latin ones, stays readable everywhere, but changes the exact characters, using the chosen Cyr2Lat profile. The setting is saved on the phone and can be changed offline. Channel chats show the same strip. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
The top-right menu has a **Compression: Off**, **SMAZ** or **Cyr2Lat** item for this contact. Tap it to choose a mode on a Compression page that explains each: SMAZ is lossless but needs a SMAZ-aware app on the other end and is only used when it makes a message smaller; Cyr2Lat swaps some Cyrillic letters for lookalike Latin ones, stays readable everywhere, but changes the exact characters, using the chosen Cyr2Lat profile. The setting is saved on the phone and can be changed offline. Channel chats have the same menu item. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
|
||||
### Message List
|
||||
|
||||
@@ -170,6 +170,7 @@ Add emoji reactions to incoming messages (not your own):
|
||||
| Translate | Incoming messages only (when translation is enabled and not yet translated) | Translates the message on-demand using the on-device model |
|
||||
| Mark as Unread | Incoming messages only | Marks this message and all subsequent incoming messages as unread |
|
||||
| Delete | All messages | Removes locally (not from mesh) |
|
||||
| Select messages | All messages | Starts multi-select with this message picked; see below |
|
||||
| Retry | Failed outgoing messages | Re-sends the message |
|
||||
| Open chat with sender | Room server chats | Opens 1:1 chat with the message sender |
|
||||
|
||||
@@ -177,6 +178,12 @@ In channel chats the menu also offers **Mark as spam**, **Filter this sender** a
|
||||
|
||||
Long-pressing directly on a detected GPS coordinate opens the coordinate action sheet (**Copy location** and **Open in maps**) instead of this message menu; long-press non-coordinate text in the message (or right-click on desktop) for message actions.
|
||||
|
||||
## Selecting Several Messages
|
||||
|
||||
Channel, direct and room chats share the same multi-select. Choose **Select messages** in the message menu; while selecting, tapping or long-pressing any message toggles it (it shows as selected immediately, with no double-tap delay) and the back button clears the selection. Chat-text double-tap-to-reset-zoom is turned off while selecting.
|
||||
|
||||
The selection bar offers **Copy** (oldest first) and **Delete** (after a confirmation) in all chats. Direct and room chats also offer **Bookmark** and **Resend**, which asks for confirmation and re-sends the selected outgoing messages oldest first. Delete and Resend are unavailable while the radio is offline.
|
||||
|
||||
## Image and translation setup
|
||||
|
||||
Enable URL images in the contact’s chat settings to preview supported image links; see [URL images](additional-features.md#url-image-previews). Images and files can also be uploaded to a configured IPFS provider from the **+** menu in direct or channel chat; the resulting URL is sent as ordinary text. See [sharing via IPFS](additional-features.md#share-an-image-via-ipfs) and [IPFS provider configuration](settings.md#ipfs-provider-configuration). Mesh image packets are currently sent through channel chat, not the direct-message composer. Set up translation and download a model in [App Settings](settings.md#translation) before using incoming or pre-send translation.
|
||||
@@ -124,14 +124,15 @@ Icon sizes in use: 24 for tile and banner icons, 20 for menu icons and small act
|
||||
| Switch that reveals more controls | `SettingsReveal` | 200ms height ease, `surfaceContainerHighest`, 16px start indent. See [Reveal on enable](#reveal-on-enable) |
|
||||
| Settings slider | `SettingsValueSlider` | Requires a 24px `icon` (`ListTile.leading`). The title includes the selected number, so it stays visible. The drag bubble repeats it |
|
||||
| Read-only value in a settings row | 24px `onSurfaceVariant` icon, title (`meshTileTitleStyle`), the value on its own line in `MeshTheme.mono` 15 w500 `onSurface`, subtitle `bodyMedium` `onSurfaceVariant` | Same value style as the Settings device info card; not `StatTile`, which is for status screens (Node Name message length) |
|
||||
| Settings choice from a long list | `ListTile` with a 24px `leading` icon, title and subtitle, and a `DropdownButtonFormField` under the subtitle | Same row shape as `SettingsValueSlider`; no label or helper inside the field (Hop limit in Contact Settings) |
|
||||
| Settings saved to a radio | `SaveToRadioPage(title:, hasChanges:, onSave:, children:)` | See [Settings pages](#settings-pages). A custom scaffold uses `UnsavedChangesGuard` + `SaveChangesAction` |
|
||||
| Section explanation | `SectionHeader(label, description:)` | One or two short sentences in `bodyMedium` `onSurfaceVariant` under the label, for a note that belongs to one section (Node Name, Location) |
|
||||
| Option that needs a longer explanation | `MeshCard(padding: EdgeInsets.zero)`: explanation text, `Divider(height: 1, indent: 16, endIndent: 16)`, the switch row, divider, optional note | Text in `bodyMedium` `onSurfaceVariant`, padding 16 / 14, so it reads like tile subtitles. The dividers are inset on both sides to match the text (Off-Grid Repeat Mode) |
|
||||
| Note at the top of a page or section | `MeshInfoCard(text)` | Info icon and `bodyMedium` text in a `MeshCard`; one or two short sentences (Add Contact, Privacy) |
|
||||
| Text field with a byte limit | `TextField` with `x / max` as `suffixIcon` (Node Name) | Count always visible. Input past the limit is allowed: the count turns `error`, `errorText` says how far over, and Save is disabled. Don't block input silently |
|
||||
| Choosing a point on a map | `LocationPickerScreen(initial:)` | Page with a fixed centre pin; returns the `LatLng` to the form |
|
||||
| Radio-style choice in a sheet | `MeshSheetOption` | Used by the language picker, map time filter and compression sheet. Optional `subtitle` explains the option; `onTap: null` disables it. Selected rows show a filled radio icon **and** a bold title, with `selected` semantics |
|
||||
| Per-chat setting at the top of a chat | Full-width strip under the app bar, above the transcript (`ChatCompressionSelector` in `widgets/chat_compression_selector.dart`) | `surfaceContainerLow` fill, `outlineVariant` bottom border, 48dp minimum height, `bodyLarge` w600 "Label: value ▾"; tap opens one `showMeshSheet` with `MeshSheetOption`s. Shows the saved value only; a spinner replaces ▾ while saving; a disabled strip shows why below the label. One shared widget for DM and channel chats; parents pass state and async callbacks |
|
||||
| Radio-style choice in a sheet | `MeshSheetOption` | Used by the language picker, map time filter and compression page. Optional `subtitle` explains the option; `onTap: null` disables it. Selected rows show a filled radio icon **and** a bold title, with `selected` semantics |
|
||||
| Per-chat setting | Overflow-menu item `[icon] Label: value` that opens a dedicated page (`ChatCompressionScreen` in `screens/chat_compression_screen.dart`) | Same `Label: value` pattern as the channel `Notifications: ...` item. Page: centred `AdaptiveAppBarTitle`, `SectionHeader` with a one-sentence description, a `MeshCard(padding: EdgeInsets.zero)` of `MeshSheetOption` rows split by `Divider(height: 1, indent: 16)`, short notes per option, a `MeshInfoCard` when the choice is locked, an error `MeshCard` when a save fails, and a spinner in the app bar while saving. Shows the saved value only. One shared page for DM and channel chats; parents pass state and async callbacks |
|
||||
| Choosing between images | Selectable thumbnail tiles in a centred `Wrap` | Image send versions (`_versionTile` in `image_send_preview_sheet.dart`). `InkWell` with `MeshRadii.sm`; selected tile gets a 3px `primary` border **and** a `primary` check badge (never colour alone); caption under the tile in `bodySmall`, w600 when selected; figures such as packet counts in `MeshTheme.mono` 12; wrap the tile in `Semantics(button: true, selected:, label:)` |
|
||||
| Editing a set of members | Current items first, then a searchable add list | Group editor (`contact_group_editor_dialog.dart`). Wrapping upper-case section label with the count ("Current members (N)"); each member row has a trailing `IconButton` remove (`error` colour, tooltip names the item); the add list excludes current members, and tapping the row or its `primary` add button adds it |
|
||||
| Popup menu row | **always** `PopupMenuItem(child: MeshMenuItemRow(icon:, label:))` | Relies on `MeshTheme.popupMenuTheme` (`surfaceContainerHigh`, `MeshRadii.md`); `MeshMenuItemRow` gives a 20px icon slot, 12px gap, and 2-line wrap + ellipsis (`leading:` for `ThemedIcon`, no icon keeps the 20px slot). Main views share `mainOverflowTrailingItems` (`widgets/connect_sheet.dart`) |
|
||||
|
||||
@@ -92,6 +92,7 @@ The location is shown on the map, used when you share your location, and sent in
|
||||
- **Auto-add contacts**: users, repeaters, room servers and sensors. Newly heard nodes of the enabled types are added to the radio's contacts; others can be added later from Discovered Contacts
|
||||
- **Contact List Limits**:
|
||||
- **Overwrite oldest** (radio): when the radio's contact list is full, the oldest non-favorited contact is replaced
|
||||
- **Hop limit** (radio): dropdown with No limit (default), 1 (direct only) and 2-64. The radio only auto-adds contacts heard in fewer hops than this; contacts beyond it still appear in Discovered Contacts. Only shown when the firmware reports the setting
|
||||
- **Limit discovered contacts** (app, not the radio; saved with the rest): keeps up to 500 discovered contacts, removing the ones heard longest ago. When off, there's no limit
|
||||
|
||||
### Privacy
|
||||
|
||||
@@ -2142,6 +2142,9 @@
|
||||
"discoveredContacts_importSummary": "Импортирани: {imported}, пропуснати вече известни: {skipped}, нечетими записи: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файлът за импортиране е твърде голям (максимум {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когато списъкът с контакти на радиото е пълен, най-старият контакт извън любимите се заменя.",
|
||||
"contactsSettings_hopLimit": "Ограничение на скоковете",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без ограничение} =1{1 (само директно)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радиото добавя автоматично само контакти с по-малко скокове от тази стойност. В „Открити контакти“ пак се запазват всички.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ограничаване на откритите контакти",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Приложението ограничава списъка „Открити контакти“ до {limit} записа. При достигане на лимита по-старите контакти се премахват. Изключете, за да премахнете ограничението.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2975,6 +2975,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Senzory",
|
||||
"contactsSettings_overwriteOldestTitle": "Přepisovat nejstarší",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Když je seznam kontaktů v rádiu plný, nahradí se nejstarší kontakt, který není oblíbený.",
|
||||
"contactsSettings_hopLimit": "Limit skoků",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez omezení} =1{1 (pouze přímo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Rádio automaticky přidá jen kontakty s menším počtem skoků, než je tato hodnota. Seznam „Objevené kontakty“ přesto uloží všechny.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Omezit objevené kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikace omezuje seznam „Objevené kontakty“ na {limit} položek. Po dosažení limitu jsou starší kontakty odstraněny. Vypněte pro zrušení limitu.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2231,6 +2231,9 @@
|
||||
"discoveredContacts_copyContact": "Kontakt in die Zwischenablage kopieren",
|
||||
"contactsSettings_overwriteOldestTitle": "Ältesten überschreiben",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Wenn die Kontaktliste des Funkgeräts voll ist, den ältesten Kontakt ersetzen, der kein Favorit ist.",
|
||||
"contactsSettings_hopLimit": "Sprunglimit",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Kein Limit} =1{1 (nur direkt)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Das Funkgerät fügt nur Kontakte mit weniger Sprüngen als diesem Wert automatisch hinzu. Unter „Entdeckte Kontakte“ werden trotzdem alle gespeichert.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Entdeckte Kontakte begrenzen",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Die App begrenzt die Liste „Entdeckte Kontakte“ auf {limit} Einträge. Ist das Limit erreicht, werden ältere Kontakte entfernt. Deaktivieren, um das Limit aufzuheben.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
+23
-5
@@ -1340,6 +1340,15 @@
|
||||
"chat_receivedGif": "Received a GIF",
|
||||
"chat_reply": "Reply",
|
||||
"chat_resend": "Resend",
|
||||
"chat_resendSelectedTitle": "Resend messages?",
|
||||
"chat_resendSelectedConfirm": "{count, plural, =1{Resend 1 selected outgoing message to this contact?} other{Resend {count} selected outgoing messages to this contact?}}",
|
||||
"@chat_resendSelectedConfirm": {
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chat_addReaction": "Add Reaction",
|
||||
"chat_me": "Me",
|
||||
"reaction_report": "Emoji Reactions",
|
||||
@@ -3298,6 +3307,16 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Sensors",
|
||||
"contactsSettings_overwriteOldestTitle": "Overwrite oldest",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Replace the oldest non-favorited contact when the radio's contact list is full.",
|
||||
"contactsSettings_hopLimit": "Hop limit",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{No limit} =1{1 (direct only)} other{{hops}}}",
|
||||
"@contactsSettings_hopLimitOption": {
|
||||
"placeholders": {
|
||||
"hops": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contactsSettings_hopLimitSubtitle": "The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limit discovered contacts",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "The app sets a {limit} entry limit to the discovered contacts list, older contacts are evicted when the limit is reached. Disable to have no limits.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
@@ -4477,7 +4496,7 @@
|
||||
"chatCompression_title": "Compression",
|
||||
"chatCompression_label": "Compression: {mode}",
|
||||
"@chatCompression_label": {
|
||||
"description": "Always-visible control at the top of a chat; mode is Off, SMAZ or Cyr2Lat",
|
||||
"description": "Chat menu item that opens the compression page; mode is Off, SMAZ or Cyr2Lat",
|
||||
"placeholders": {
|
||||
"mode": {
|
||||
"type": "String"
|
||||
@@ -4487,11 +4506,10 @@
|
||||
"chatCompression_off": "Off",
|
||||
"chatCompression_smaz": "SMAZ",
|
||||
"chatCompression_cyr2lat": "Cyr2Lat",
|
||||
"chatCompression_changeHint": "Change compression for this chat",
|
||||
"chatCompression_sheetSubtitle": "Applies to messages you send in this chat. Saved on this phone.",
|
||||
"chatCompression_offDescription": "No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.",
|
||||
"chatCompression_smazDescription": "Lossless compression for short text. The recipient's app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.",
|
||||
"chatCompression_cyr2latDescription": "Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.",
|
||||
"chatCompression_offDescription": "Sends your text as typed. Every app can read it.",
|
||||
"chatCompression_smazDescription": "Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.",
|
||||
"chatCompression_cyr2latDescription": "Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.",
|
||||
"chatCompression_profile": "Cyr2Lat profile",
|
||||
"chatCompression_noStorageId": "Can't change compression until this channel has synced from the radio.",
|
||||
"chatCompression_saveFailed": "Couldn't save the compression setting. Showing the saved setting.",
|
||||
|
||||
@@ -2162,6 +2162,9 @@
|
||||
"discoveredContacts_searchHint": "Buscar contactos descubiertos",
|
||||
"discoveredContacts_addContact": "Agregar contacto",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Cuando la lista de contactos de la radio esté llena, reemplaza el contacto no favorito más antiguo.",
|
||||
"contactsSettings_hopLimit": "Límite de saltos",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sin límite} =1{1 (solo directo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio solo añade automáticamente contactos con menos saltos que este valor. En Contactos descubiertos se siguen guardando todos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contactos descubiertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "La app limita la lista \"Contactos descubiertos\" a {limit} entradas. Al alcanzar el límite, se eliminan los contactos más antiguos. Desactivar para quitar el límite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2155,6 +2155,9 @@
|
||||
"discoveredContacts_Title": "Contacts découverts",
|
||||
"discoveredContacts_searchHint": "Rechercher des contacts découverts",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Lorsque la liste de contacts de la radio est pleine, remplace le plus ancien contact non favori.",
|
||||
"contactsSettings_hopLimit": "Limite de sauts",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Aucune limite} =1{1 (direct uniquement)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio n'ajoute automatiquement que les contacts situés à moins de sauts que cette valeur. Ils sont quand même tous enregistrés dans Contacts découverts.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limiter les contacts découverts",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "L'application limite la liste « Contacts découverts » à {limit} entrées. Une fois la limite atteinte, les contacts les plus anciens sont supprimés. Désactivez pour supprimer la limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2227,6 +2227,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Érzékelők",
|
||||
"contactsSettings_overwriteOldestTitle": "A legrégebbi felülírása",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Ha a rádió kapcsolatlistája megtelt, a legrégebbi, nem kedvenc kapcsolat lecserélődik.",
|
||||
"contactsSettings_hopLimit": "Ugráskorlát",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Nincs korlát} =1{1 (csak közvetlen)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "A rádió csak az ennél kevesebb ugrásra lévő kapcsolatokat adja hozzá automatikusan. A „Felfedezett kapcsolatok” lista továbbra is mindet elmenti.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Felfedezett kapcsolatok korlátozása",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Az alkalmazás a „Felfedezett kapcsolatok” listát {limit} bejegyzésre korlátozza. A korlát elérésekor a régebbi kapcsolatok törlődnek. Kikapcsolva nincs korlát.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2204,6 +2204,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando l'elenco dei contatti della radio è pieno, sostituisce il contatto più vecchio non tra i preferiti.",
|
||||
"contactsSettings_hopLimit": "Limite di salti",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Nessun limite} =1{1 (solo diretto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "La radio aggiunge automaticamente solo i contatti con meno salti di questo valore. In Contatti scoperti vengono comunque salvati tutti.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limita i contatti scoperti",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "L'app limita l'elenco \"Contatti scoperti\" a {limit} voci. Al raggiungimento del limite, i contatti più vecchi vengono rimossi. Disattiva per rimuovere il limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2237,6 +2237,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "センサー",
|
||||
"contactsSettings_overwriteOldestTitle": "最も古い連絡先を上書き",
|
||||
"contactsSettings_overwriteOldestSubtitle": "ラジオの連絡先リストが満杯になったら、お気に入り以外で最も古い連絡先を置き換えます。",
|
||||
"contactsSettings_hopLimit": "ホップ数の上限",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{制限なし} =1{1(直接のみ)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "ラジオはこの値より少ないホップ数の連絡先のみ自動追加します。「連絡先が見つかった」にはすべて保存されます。",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "発見された連絡先を制限",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "アプリは「連絡先が見つかった」リストを {limit} 件に制限します。上限に達すると古い連絡先から削除されます。オフにすると上限はなくなります。",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2142,6 +2142,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "센서",
|
||||
"contactsSettings_overwriteOldestTitle": "가장 오래된 연락처 덮어쓰기",
|
||||
"contactsSettings_overwriteOldestSubtitle": "라디오의 연락처 목록이 가득 차면 즐겨찾기가 아닌 가장 오래된 연락처를 교체합니다.",
|
||||
"contactsSettings_hopLimit": "홉 수 제한",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{제한 없음} =1{1 (직접 연결만)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "라디오는 이 값보다 적은 홉의 연락처만 자동 추가합니다. '연락처 찾기'에는 모두 저장됩니다.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "발견된 연락처 제한",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "앱은 \"연락처 찾기\" 목록을 {limit}개 항목으로 제한합니다. 한도에 도달하면 오래된 연락처부터 삭제됩니다. 끄면 제한이 없습니다.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -4561,6 +4561,18 @@ abstract class AppLocalizations {
|
||||
/// **'Resend'**
|
||||
String get chat_resend;
|
||||
|
||||
/// No description provided for @chat_resendSelectedTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Resend messages?'**
|
||||
String get chat_resendSelectedTitle;
|
||||
|
||||
/// No description provided for @chat_resendSelectedConfirm.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{count, plural, =1{Resend 1 selected outgoing message to this contact?} other{Resend {count} selected outgoing messages to this contact?}}'**
|
||||
String chat_resendSelectedConfirm(int count);
|
||||
|
||||
/// No description provided for @chat_addReaction.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -10049,6 +10061,24 @@ abstract class AppLocalizations {
|
||||
/// **'Replace the oldest non-favorited contact when the radio\'s contact list is full.'**
|
||||
String get contactsSettings_overwriteOldestSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimit.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Hop limit'**
|
||||
String get contactsSettings_hopLimit;
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimitOption.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'{hops, plural, =0{No limit} =1{1 (direct only)} other{{hops}}}'**
|
||||
String contactsSettings_hopLimitOption(int hops);
|
||||
|
||||
/// No description provided for @contactsSettings_hopLimitSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.'**
|
||||
String get contactsSettings_hopLimitSubtitle;
|
||||
|
||||
/// No description provided for @contactsSettings_evictDiscoveredContactsTitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -12970,7 +13000,7 @@ abstract class AppLocalizations {
|
||||
/// **'Compression'**
|
||||
String get chatCompression_title;
|
||||
|
||||
/// Always-visible control at the top of a chat; mode is Off, SMAZ or Cyr2Lat
|
||||
/// Chat menu item that opens the compression page; mode is Off, SMAZ or Cyr2Lat
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Compression: {mode}'**
|
||||
@@ -12994,12 +13024,6 @@ abstract class AppLocalizations {
|
||||
/// **'Cyr2Lat'**
|
||||
String get chatCompression_cyr2lat;
|
||||
|
||||
/// No description provided for @chatCompression_changeHint.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Change compression for this chat'**
|
||||
String get chatCompression_changeHint;
|
||||
|
||||
/// No description provided for @chatCompression_sheetSubtitle.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -13009,19 +13033,19 @@ abstract class AppLocalizations {
|
||||
/// No description provided for @chatCompression_offDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.'**
|
||||
/// **'Sends your text as typed. Every app can read it.'**
|
||||
String get chatCompression_offDescription;
|
||||
|
||||
/// No description provided for @chatCompression_smazDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Lossless compression for short text. The recipient\'s app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.'**
|
||||
/// **'Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.'**
|
||||
String get chatCompression_smazDescription;
|
||||
|
||||
/// No description provided for @chatCompression_cyr2latDescription.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.'**
|
||||
/// **'Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.'**
|
||||
String get chatCompression_cyr2latDescription;
|
||||
|
||||
/// No description provided for @chatCompression_profile.
|
||||
|
||||
@@ -2631,6 +2631,20 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Изпрати отново';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Добави Реакция';
|
||||
|
||||
@@ -5924,6 +5938,25 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когато списъкът с контакти на радиото е пълен, най-старият контакт извън любимите се заменя.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ограничение на скоковете';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (само директно)',
|
||||
zero: 'Без ограничение',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радиото добавя автоматично само контакти с по-малко скокове от тази стойност. В „Открити контакти“ пак се запазват всички.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ограничаване на откритите контакти';
|
||||
@@ -7805,9 +7838,6 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Промяна на компресията за този чат';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Важи за съобщенията, които изпращате в този чат. Запазва се на този телефон.';
|
||||
|
||||
@@ -2625,6 +2625,20 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Odeslat znovu';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Přidat reakci';
|
||||
|
||||
@@ -5903,6 +5917,25 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Když je seznam kontaktů v rádiu plný, nahradí se nejstarší kontakt, který není oblíbený.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skoků';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (pouze přímo)',
|
||||
zero: 'Bez omezení',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Rádio automaticky přidá jen kontakty s menším počtem skoků, než je tato hodnota. Seznam „Objevené kontakty“ přesto uloží všechny.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Omezit objevené kontakty';
|
||||
@@ -7779,9 +7812,6 @@ class AppLocalizationsCs extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Změnit kompresi pro tento chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Platí pro zprávy odeslané v tomto chatu. Uloženo v tomto telefonu.';
|
||||
|
||||
@@ -2634,6 +2634,20 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Erneut senden';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Reaktion hinzufügen';
|
||||
|
||||
@@ -5935,6 +5949,25 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Wenn die Kontaktliste des Funkgeräts voll ist, den ältesten Kontakt ersetzen, der kein Favorit ist.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Sprunglimit';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (nur direkt)',
|
||||
zero: 'Kein Limit',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Das Funkgerät fügt nur Kontakte mit weniger Sprüngen als diesem Wert automatisch hinzu. Unter „Entdeckte Kontakte“ werden trotzdem alle gespeichert.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Entdeckte Kontakte begrenzen';
|
||||
@@ -7816,9 +7849,6 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Kompression für diesen Chat ändern';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Gilt für Nachrichten, die Sie in diesem Chat senden. Auf diesem Telefon gespeichert.';
|
||||
|
||||
@@ -2586,6 +2586,20 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Resend';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Add Reaction';
|
||||
|
||||
@@ -5843,6 +5857,25 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Replace the oldest non-favorited contact when the radio\'s contact list is full.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hop limit';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (direct only)',
|
||||
zero: 'No limit',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'The radio only auto-adds contacts under this many hops. Discovered Contacts still saves them all.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limit discovered contacts';
|
||||
@@ -7690,24 +7723,21 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Change compression for this chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Applies to messages you send in this chat. Saved on this phone.';
|
||||
|
||||
@override
|
||||
String get chatCompression_offDescription =>
|
||||
'No compression. Sends your text exactly as typed. Every app can read it. Saves no bytes.';
|
||||
'Sends your text as typed. Every app can read it.';
|
||||
|
||||
@override
|
||||
String get chatCompression_smazDescription =>
|
||||
'Lossless compression for short text. The recipient\'s app must support SMAZ; other apps show unreadable \"s:…\" text. Only used when it makes a message smaller, so not every message is compressed.';
|
||||
'Shrinks English text. Used only when the message gets shorter. Apps without SMAZ show \"s:…\" instead of your text.';
|
||||
|
||||
@override
|
||||
String get chatCompression_cyr2latDescription =>
|
||||
'Not lossless. Swaps some Cyrillic letters for lookalike Latin ones (А→A, З→3) to save bytes. Readable in any app with no decoding, but the exact characters change, including your own sent messages here. Copying, search and technical text may be affected. Results depend on the chosen profile.';
|
||||
'Swaps Cyrillic letters for similar Latin ones (А→A). Every app can read it, but the characters change. Not lossless.';
|
||||
|
||||
@override
|
||||
String get chatCompression_profile => 'Cyr2Lat profile';
|
||||
|
||||
@@ -2625,6 +2625,20 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Reenviar';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Añadir Reacción';
|
||||
|
||||
@@ -5924,6 +5938,25 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Cuando la lista de contactos de la radio esté llena, reemplaza el contacto no favorito más antiguo.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Límite de saltos';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (solo directo)',
|
||||
zero: 'Sin límite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio solo añade automáticamente contactos con menos saltos que este valor. En Contactos descubiertos se siguen guardando todos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contactos descubiertos';
|
||||
@@ -7797,9 +7830,6 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Cambiar la compresión de este chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Se aplica a los mensajes que envíes en este chat. Se guarda en este teléfono.';
|
||||
|
||||
@@ -2629,6 +2629,20 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Renvoyer';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Ajouter une réaction';
|
||||
|
||||
@@ -5938,6 +5952,25 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Lorsque la liste de contacts de la radio est pleine, remplace le plus ancien contact non favori.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de sauts';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (direct uniquement)',
|
||||
zero: 'Aucune limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio n\'ajoute automatiquement que les contacts situés à moins de sauts que cette valeur. Ils sont quand même tous enregistrés dans Contacts découverts.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limiter les contacts découverts';
|
||||
@@ -7820,10 +7853,6 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Modifier la compression de cette discussion';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'S\'applique aux messages que vous envoyez dans cette discussion. Enregistré sur ce téléphone.';
|
||||
|
||||
@@ -2621,6 +2621,20 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Újraküldés';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Reakció hozzáadása';
|
||||
|
||||
@@ -5922,6 +5936,25 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Ha a rádió kapcsolatlistája megtelt, a legrégebbi, nem kedvenc kapcsolat lecserélődik.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ugráskorlát';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (csak közvetlen)',
|
||||
zero: 'Nincs korlát',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'A rádió csak az ennél kevesebb ugrásra lévő kapcsolatokat adja hozzá automatikusan. A „Felfedezett kapcsolatok” lista továbbra is mindet elmenti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Felfedezett kapcsolatok korlátozása';
|
||||
@@ -7786,10 +7819,6 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Tömörítés módosítása ebben a csevegésben';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Az ebben a csevegésben küldött üzenetekre vonatkozik. Ezen a telefonon van mentve.';
|
||||
|
||||
@@ -2628,6 +2628,20 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Reinvia';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Aggiungi Reazione';
|
||||
|
||||
@@ -5929,6 +5943,25 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando l\'elenco dei contatti della radio è pieno, sostituisce il contatto più vecchio non tra i preferiti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite di salti';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (solo diretto)',
|
||||
zero: 'Nessun limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'La radio aggiunge automaticamente solo i contatti con meno salti di questo valore. In Contatti scoperti vengono comunque salvati tutti.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limita i contatti scoperti';
|
||||
@@ -7808,10 +7841,6 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Cambia la compressione per questa chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Si applica ai messaggi che invii in questa chat. Salvato su questo telefono.';
|
||||
|
||||
@@ -2507,6 +2507,20 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => '再送信';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'リアクションを追加';
|
||||
|
||||
@@ -5647,6 +5661,25 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'ラジオの連絡先リストが満杯になったら、お気に入り以外で最も古い連絡先を置き換えます。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'ホップ数の上限';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1(直接のみ)',
|
||||
zero: '制限なし',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'ラジオはこの値より少ないホップ数の連絡先のみ自動追加します。「連絡先が見つかった」にはすべて保存されます。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '発見された連絡先を制限';
|
||||
|
||||
@@ -7450,9 +7483,6 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'このチャットの圧縮設定を変更';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'このチャットで送信するメッセージに適用されます。このスマートフォンに保存されます。';
|
||||
|
||||
@@ -2507,6 +2507,20 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => '다시 보내기';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => '댓글 추가';
|
||||
|
||||
@@ -5657,6 +5671,25 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'라디오의 연락처 목록이 가득 차면 즐겨찾기가 아닌 가장 오래된 연락처를 교체합니다.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => '홉 수 제한';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (직접 연결만)',
|
||||
zero: '제한 없음',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'라디오는 이 값보다 적은 홉의 연락처만 자동 추가합니다. \'연락처 찾기\'에는 모두 저장됩니다.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '발견된 연락처 제한';
|
||||
|
||||
@@ -7459,9 +7492,6 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => '이 채팅의 압축 설정 변경';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'이 채팅에서 보내는 메시지에 적용됩니다. 이 휴대폰에 저장됩니다.';
|
||||
|
||||
@@ -2612,6 +2612,20 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Opnieuw verzenden';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Reactie toevoegen';
|
||||
|
||||
@@ -5895,6 +5909,25 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Als de contactenlijst van de radio vol is, het oudste contact vervangen dat geen favoriet is.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hoplimiet';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (alleen direct)',
|
||||
zero: 'Geen limiet',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'De radio voegt alleen contacten met minder hops dan deze waarde automatisch toe. In Ontdekte contacten worden ze nog steeds allemaal opgeslagen.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ontdekte contacten beperken';
|
||||
@@ -7761,9 +7794,6 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Compressie voor deze chat wijzigen';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Geldt voor berichten die je in deze chat verstuurt. Opgeslagen op deze telefoon.';
|
||||
|
||||
@@ -2653,6 +2653,20 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Wyślij ponownie';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Dodaj Reakcję';
|
||||
|
||||
@@ -5965,6 +5979,25 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Gdy lista kontaktów w radiu jest pełna, najstarszy kontakt spoza ulubionych zostanie zastąpiony.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skoków';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (tylko bezpośrednio)',
|
||||
zero: 'Bez limitu',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radio automatycznie dodaje tylko kontakty z mniejszą liczbą skoków niż ta wartość. Lista „Odkryte Kontakty” nadal zapisuje wszystkie.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ogranicz odkryte kontakty';
|
||||
@@ -7850,9 +7883,6 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Zmień kompresję w tej rozmowie';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Dotyczy wiadomości wysyłanych w tej rozmowie. Zapisane na tym telefonie.';
|
||||
|
||||
@@ -2622,6 +2622,20 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Reenviar';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Adicionar Reação';
|
||||
|
||||
@@ -5920,6 +5934,25 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando a lista de contatos do rádio estiver cheia, substitui o contato mais antigo que não seja favorito.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de saltos';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (somente direto)',
|
||||
zero: 'Sem limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'O rádio só adiciona automaticamente contatos com menos saltos que este valor. Todos continuam sendo salvos em Contatos Descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contatos descobertos';
|
||||
@@ -7785,10 +7818,6 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Alterar a compressão desta conversa';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Vale para as mensagens que você envia nesta conversa. Salvo neste celular.';
|
||||
@@ -14166,6 +14195,25 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Quando a lista de contactos do rádio estiver cheia, substitui o contacto mais antigo que não seja favorito.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limite de hops';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (apenas direto)',
|
||||
zero: 'Sem limite',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'O rádio só adiciona automaticamente contactos com menos hops do que este valor. Todos continuam a ser guardados em Contactos descobertos.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Limitar contactos descobertos';
|
||||
@@ -16029,10 +16077,6 @@ class AppLocalizationsPtPt extends AppLocalizationsPt {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Alterar a compressão desta conversa';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Aplica-se às mensagens que envia nesta conversa. Guardado neste telemóvel.';
|
||||
|
||||
@@ -2633,6 +2633,20 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Отправить снова';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Добавить реакцию';
|
||||
|
||||
@@ -5941,6 +5955,25 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Когда список контактов радио заполнен, заменяется самый старый контакт не из избранного.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Лимит хопов';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (только напрямую)',
|
||||
zero: 'Без лимита',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радио автоматически добавляет только контакты, до которых меньше хопов, чем это значение. В списке «Обнаруженные контакты» по-прежнему сохраняются все.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Ограничивать обнаруженные контакты';
|
||||
@@ -7829,9 +7862,6 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Изменить сжатие для этого чата';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Действует для сообщений, которые вы отправляете в этом чате. Сохраняется на этом телефоне.';
|
||||
|
||||
@@ -2625,6 +2625,20 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Odoslať znova';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Pridať Reakciu';
|
||||
|
||||
@@ -5918,6 +5932,25 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Keď je zoznam kontaktov v rádiu plný, nahradí sa najstarší kontakt, ktorý nie je obľúbený.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Limit skokov';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (iba priamo)',
|
||||
zero: 'Bez obmedzenia',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Rádio automaticky pridá iba kontakty s menším počtom skokov, než je táto hodnota. Zoznam „Objavené kontakty“ aj tak uloží všetky.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Obmedziť objavené kontakty';
|
||||
@@ -7788,9 +7821,6 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Zmeniť kompresiu pre tento chat';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Platí pre správy, ktoré v tomto chate odošlete. Uložené v tomto telefóne.';
|
||||
|
||||
@@ -2626,6 +2626,20 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Pošlji znova';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Dodaj reakcijo';
|
||||
|
||||
@@ -5908,6 +5922,25 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Ko je seznam stikov v radiu poln, se zamenja najstarejši stik, ki ni med priljubljenimi.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Omejitev skokov';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (samo neposredno)',
|
||||
zero: 'Brez omejitve',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radio avtomatsko doda le stike z manj skoki od te vrednosti. Seznam »Odkriti stiki« še vedno shrani vse.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Omeji odkrite stike';
|
||||
@@ -7788,9 +7821,6 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Spremeni stiskanje za ta klepet';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Velja za sporočila, ki jih pošljete v tem klepetu. Shranjeno v tem telefonu.';
|
||||
|
||||
@@ -2600,6 +2600,20 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Skicka igen';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Lägg till reaktion';
|
||||
|
||||
@@ -5876,6 +5890,25 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'När radions kontaktlista är full ersätts den äldsta kontakten som inte är en favorit.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Hoppgräns';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (endast direkt)',
|
||||
zero: 'Ingen gräns',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Radion lägger bara till kontakter automatiskt om de har färre hopp än detta värde. Alla sparas ändå i Upptäckta kontakter.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Begränsa upptäckta kontakter';
|
||||
@@ -7737,10 +7770,6 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint =>
|
||||
'Ändra komprimering för den här chatten';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Gäller meddelanden du skickar i den här chatten. Sparas på den här telefonen.';
|
||||
|
||||
@@ -2630,6 +2630,20 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => 'Надіслати знову';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => 'Додати реакцію';
|
||||
|
||||
@@ -5946,6 +5960,25 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'Коли список контактів радіо заповнений, замінюється найстаріший контакт, якого немає в улюблених.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => 'Ліміт переходів';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1 (лише напряму)',
|
||||
zero: 'Без ліміту',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'Радіо автоматично додає лише контакти, до яких менше переходів, ніж це значення. У списку «Виявлені контакти» й надалі зберігаються всі.';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle =>
|
||||
'Обмежувати виявлені контакти';
|
||||
@@ -7843,9 +7876,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Кир→Лат';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => 'Змінити стиснення для цього чату';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle =>
|
||||
'Діє для повідомлень, які ви надсилаєте в цьому чаті. Зберігається на цьому телефоні.';
|
||||
|
||||
@@ -2472,6 +2472,20 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get chat_resend => '重新发送';
|
||||
|
||||
@override
|
||||
String get chat_resendSelectedTitle => 'Resend messages?';
|
||||
|
||||
@override
|
||||
String chat_resendSelectedConfirm(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'Resend $count selected outgoing messages to this contact?',
|
||||
one: 'Resend 1 selected outgoing message to this contact?',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_addReaction => '添加表情';
|
||||
|
||||
@@ -5519,6 +5533,25 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
String get contactsSettings_overwriteOldestSubtitle =>
|
||||
'无线电的联系人列表已满时,替换最旧的非收藏联系人。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimit => '跳数限制';
|
||||
|
||||
@override
|
||||
String contactsSettings_hopLimitOption(int hops) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hops,
|
||||
locale: localeName,
|
||||
other: '$hops',
|
||||
one: '1(仅直连)',
|
||||
zero: '不限',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get contactsSettings_hopLimitSubtitle =>
|
||||
'无线电只会自动添加跳数少于此值的联系人。“已发现的联系人”中仍会保存全部。';
|
||||
|
||||
@override
|
||||
String get contactsSettings_evictDiscoveredContactsTitle => '限制已发现的联系人';
|
||||
|
||||
@@ -7296,9 +7329,6 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
@override
|
||||
String get chatCompression_cyr2lat => 'Cyr2Lat';
|
||||
|
||||
@override
|
||||
String get chatCompression_changeHint => '更改此聊天的压缩设置';
|
||||
|
||||
@override
|
||||
String get chatCompression_sheetSubtitle => '适用于你在此聊天中发送的消息。保存在本机。';
|
||||
|
||||
|
||||
@@ -2180,6 +2180,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Als de contactenlijst van de radio vol is, het oudste contact vervangen dat geen favoriet is.",
|
||||
"contactsSettings_hopLimit": "Hoplimiet",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Geen limiet} =1{1 (alleen direct)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "De radio voegt alleen contacten met minder hops dan deze waarde automatisch toe. In Ontdekte contacten worden ze nog steeds allemaal opgeslagen.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ontdekte contacten beperken",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "De app beperkt de lijst \"Ontdekte contacten\" tot {limit} items. Bij het bereiken van de limiet worden oudere contacten verwijderd. Schakel uit om de limiet op te heffen.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2180,6 +2180,9 @@
|
||||
"discoveredContacts_importSummary": "Zaimportowano: {imported}, pominięto już znane: {skipped}, nieczytelne wpisy: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Plik importu jest zbyt duży (maksymalnie {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Gdy lista kontaktów w radiu jest pełna, najstarszy kontakt spoza ulubionych zostanie zastąpiony.",
|
||||
"contactsSettings_hopLimit": "Limit skoków",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez limitu} =1{1 (tylko bezpośrednio)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radio automatycznie dodaje tylko kontakty z mniejszą liczbą skoków niż ta wartość. Lista „Odkryte Kontakty” nadal zapisuje wszystkie.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ogranicz odkryte kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikacja ogranicza listę „Odkryte Kontakty” do {limit} pozycji. Po osiągnięciu limitu starsze kontakty są usuwane. Wyłącz, aby znieść limit.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2073,6 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando a lista de contatos do rádio estiver cheia, substitui o contato mais antigo que não seja favorito.",
|
||||
"contactsSettings_hopLimit": "Limite de saltos",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sem limite} =1{1 (somente direto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "O rádio só adiciona automaticamente contatos com menos saltos que este valor. Todos continuam sendo salvos em Contatos Descobertos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contatos descobertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "O app limita a lista \"Contatos Descobertos\" a {limit} entradas. Ao atingir o limite, os contatos mais antigos são removidos. Desative para remover o limite.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -1610,6 +1610,9 @@
|
||||
"contactsSettings_autoAddSensorsTitle": "Sensores",
|
||||
"contactsSettings_overwriteOldestTitle": "Substituir o mais antigo",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Quando a lista de contactos do rádio estiver cheia, substitui o contacto mais antigo que não seja favorito.",
|
||||
"contactsSettings_hopLimit": "Limite de hops",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Sem limite} =1{1 (apenas direto)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "O rádio só adiciona automaticamente contactos com menos hops do que este valor. Todos continuam a ser guardados em Contactos descobertos.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Limitar contactos descobertos",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "A app limita a lista \"Contactos descobertos\" a {limit} entradas. Ao atingir o limite, os contactos mais antigos são removidos. Desative para remover o limite.",
|
||||
"discoveredContacts_Title": "Contactos descobertos",
|
||||
|
||||
@@ -1321,6 +1321,9 @@
|
||||
"discoveredContacts_importSummary": "Импортировано: {imported}, пропущено уже известных: {skipped}, нечитаемых записей: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файл импорта слишком большой (максимум {maxMb} МБ).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Когда список контактов радио заполнен, заменяется самый старый контакт не из избранного.",
|
||||
"contactsSettings_hopLimit": "Лимит хопов",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без лимита} =1{1 (только напрямую)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радио автоматически добавляет только контакты, до которых меньше хопов, чем это значение. В списке «Обнаруженные контакты» по-прежнему сохраняются все.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Ограничивать обнаруженные контакты",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Приложение ограничивает список «Обнаруженные контакты» до {limit} записей. При достижении лимита старые контакты удаляются. Отключите, чтобы снять ограничение.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2147,6 +2147,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Keď je zoznam kontaktov v rádiu plný, nahradí sa najstarší kontakt, ktorý nie je obľúbený.",
|
||||
"contactsSettings_hopLimit": "Limit skokov",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Bez obmedzenia} =1{1 (iba priamo)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Rádio automaticky pridá iba kontakty s menším počtom skokov, než je táto hodnota. Zoznam „Objavené kontakty“ aj tak uloží všetky.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Obmedziť objavené kontakty",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikácia obmedzuje zoznam „Objavené kontakty“ na {limit} položiek. Po dosiahnutí limitu sa staršie kontakty odstránia. Vypnite pre zrušenie limitu.",
|
||||
"@contactsSettings_evictDiscoveredContactsSubtitle": {
|
||||
|
||||
@@ -2073,6 +2073,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "Ko je seznam stikov v radiu poln, se zamenja najstarejši stik, ki ni med priljubljenimi.",
|
||||
"contactsSettings_hopLimit": "Omejitev skokov",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Brez omejitve} =1{1 (samo neposredno)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radio avtomatsko doda le stike z manj skoki od te vrednosti. Seznam »Odkriti stiki« še vedno shrani vse.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Omeji odkrite stike",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Aplikacija omeji seznam »Odkriti stiki« na {limit} vnosov. Ko je omejitev dosežena, se starejši stiki odstranijo. Izklopite za odpravo omejitve.",
|
||||
"common_deleteAll": "Izbriši vse",
|
||||
|
||||
@@ -2074,6 +2074,9 @@
|
||||
"discoveredContacts_importSummary": "Importerade: {imported}, hoppade över redan kända: {skipped}, oläsliga poster: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Importfilen är för stor (högst {maxMb} MB).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "När radions kontaktlista är full ersätts den äldsta kontakten som inte är en favorit.",
|
||||
"contactsSettings_hopLimit": "Hoppgräns",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Ingen gräns} =1{1 (endast direkt)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Radion lägger bara till kontakter automatiskt om de har färre hopp än detta värde. Alla sparas ändå i Upptäckta kontakter.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Begränsa upptäckta kontakter",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Appen begränsar listan ”Upptäckta kontakter” till {limit} poster. När gränsen nås tas äldre kontakter bort. Stäng av för att ta bort gränsen.",
|
||||
"common_deleteAll": "Ta bort alla",
|
||||
|
||||
@@ -2152,6 +2152,9 @@
|
||||
"discoveredContacts_importSummary": "Імпортовано: {imported}, пропущено вже відомих: {skipped}, нечитабельних записів: {invalid}.",
|
||||
"discoveredContacts_importTooLarge": "Файл імпорту завеликий (максимум {maxMb} МБ).",
|
||||
"contactsSettings_overwriteOldestSubtitle": "Коли список контактів радіо заповнений, замінюється найстаріший контакт, якого немає в улюблених.",
|
||||
"contactsSettings_hopLimit": "Ліміт переходів",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{Без ліміту} =1{1 (лише напряму)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "Радіо автоматично додає лише контакти, до яких менше переходів, ніж це значення. У списку «Виявлені контакти» й надалі зберігаються всі.",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "Обмежувати виявлені контакти",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "Застосунок обмежує список «Виявлені контакти» до {limit} записів. Коли ліміт досягнуто, старіші контакти видаляються. Вимкніть, щоб зняти обмеження.",
|
||||
"common_deleteAll": "Видалити все",
|
||||
|
||||
@@ -2078,6 +2078,9 @@
|
||||
}
|
||||
},
|
||||
"contactsSettings_overwriteOldestSubtitle": "无线电的联系人列表已满时,替换最旧的非收藏联系人。",
|
||||
"contactsSettings_hopLimit": "跳数限制",
|
||||
"contactsSettings_hopLimitOption": "{hops, plural, =0{不限} =1{1(仅直连)} other{{hops}}}",
|
||||
"contactsSettings_hopLimitSubtitle": "无线电只会自动添加跳数少于此值的联系人。“已发现的联系人”中仍会保存全部。",
|
||||
"contactsSettings_evictDiscoveredContactsTitle": "限制已发现的联系人",
|
||||
"contactsSettings_evictDiscoveredContactsSubtitle": "应用将“已发现的联系人”列表限制为 {limit} 条。达到上限时会移除较旧的联系人。关闭后不限数量。",
|
||||
"common_deleteAll": "删除全部",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
@@ -66,6 +67,7 @@ class ReviewRadio {
|
||||
int _txPowerDbm = ReviewScript.txPowerDbm;
|
||||
int _autoAddFlags =
|
||||
autoAddChatFlag | autoAddRepeaterFlag | autoAddRoomServerFlag;
|
||||
int _autoAddMaxHops = 0;
|
||||
int _timeOffsetSecs = 0;
|
||||
|
||||
/// Frames radio to app. Each event is one complete companion frame.
|
||||
@@ -240,10 +242,17 @@ class ReviewRadio {
|
||||
_emit([ReviewFrames.customVars('gps:0')]);
|
||||
break;
|
||||
case cmdGetAutoAddConfig:
|
||||
_emit([ReviewFrames.autoAddConfig(flags: _autoAddFlags)]);
|
||||
_emit([
|
||||
ReviewFrames.autoAddConfig(
|
||||
flags: _autoAddFlags,
|
||||
maxHops: _autoAddMaxHops,
|
||||
),
|
||||
]);
|
||||
break;
|
||||
case cmdSetAutoAddConfig:
|
||||
if (frame.length >= 2) _autoAddFlags = frame[1];
|
||||
// Like firmware: the optional hop limit, capped at 64.
|
||||
if (frame.length >= 3) _autoAddMaxHops = math.min(frame[2], 64);
|
||||
_emit([ReviewFrames.ok()]);
|
||||
break;
|
||||
case cmdGetAllowedRepeatFreq:
|
||||
|
||||
@@ -54,7 +54,6 @@ import '../widgets/empty_state.dart';
|
||||
import '../widgets/filter_rule_dialog.dart';
|
||||
import '../widgets/filtered_message_ghost.dart';
|
||||
import '../widgets/chat_composer.dart';
|
||||
import '../widgets/chat_compression_selector.dart';
|
||||
import '../widgets/chat_send_pipeline.dart';
|
||||
import '../widgets/chat_zoom_wrapper.dart';
|
||||
import '../widgets/message_bubble_frame.dart';
|
||||
@@ -77,6 +76,7 @@ import '../widgets/shared_contact_card.dart';
|
||||
import 'app_settings_screen.dart';
|
||||
import 'bookmarks_screen.dart';
|
||||
import 'channel_chat_transcript_grouping.dart';
|
||||
import 'chat_compression_screen.dart';
|
||||
import 'channels_screen.dart' show confirmDeleteChannel, showEditChannelSheet;
|
||||
import 'channel_message_path_screen.dart';
|
||||
import 'map_screen.dart';
|
||||
@@ -599,6 +599,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
_toggleChannelFiltering();
|
||||
case 'notifications':
|
||||
showChannelNotificationModeSheet(context, muteKey);
|
||||
case 'compression':
|
||||
_openCompressionScreen();
|
||||
case 'region':
|
||||
openRegionSelectDialog(widget.channel);
|
||||
case 'editChannel':
|
||||
@@ -673,6 +675,20 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'compression',
|
||||
child: _menuRow(
|
||||
Icons.compress,
|
||||
context.l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(
|
||||
context,
|
||||
context.read<MeshCoreConnector>().channelCompressionMode(
|
||||
widget.channel.index,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'region',
|
||||
child: _menuRow(
|
||||
@@ -896,7 +912,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
bottom: false,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildCompressionSelector(),
|
||||
Expanded(
|
||||
child: ChatBackdrop(
|
||||
contentKey: _messageAreaKey,
|
||||
@@ -992,6 +1007,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
return Stack(
|
||||
children: [
|
||||
ChatZoomWrapper(
|
||||
enabled: !_selecting,
|
||||
child: ListView.builder(
|
||||
reverse: true, // List grows from bottom up
|
||||
controller: _scrollController,
|
||||
@@ -1017,14 +1033,19 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
);
|
||||
}
|
||||
final row = layout.rowAt(index, messages);
|
||||
final GlobalKey messageKey;
|
||||
// Duplicate-id rows use a stable value key
|
||||
// (not a fresh GlobalKey) so toggling one
|
||||
// row does not remount every visible row.
|
||||
final Key messageKey;
|
||||
if (layout.keyedIndices.contains(index)) {
|
||||
messageKey = _messageKeys.putIfAbsent(
|
||||
row.id,
|
||||
GlobalKey.new,
|
||||
);
|
||||
} else {
|
||||
messageKey = GlobalKey();
|
||||
messageKey = ValueKey<String>(
|
||||
'${row.id}#dup$index',
|
||||
);
|
||||
}
|
||||
final dividerId = _unreadDividerMessageId;
|
||||
final isUnreadAnchor =
|
||||
@@ -2805,26 +2826,35 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
/// Compression is stored on this phone under the channel's storage ID, so
|
||||
/// it can change while the radio is offline, but not before the slot has
|
||||
/// one.
|
||||
Widget _buildCompressionSelector() {
|
||||
void _openCompressionScreen() {
|
||||
final slot = widget.channel.index;
|
||||
return Consumer2<MeshCoreConnector, AppSettingsService>(
|
||||
builder: (context, connector, settingsService, _) {
|
||||
final hasStorageId = connector.channelIdForSlot(slot) != null;
|
||||
return ChatCompressionSelector(
|
||||
mode: connector.channelCompressionMode(slot),
|
||||
enabled: hasStorageId,
|
||||
disabledReason: hasStorageId
|
||||
? null
|
||||
: context.l10n.chatCompression_noStorageId,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getChannelCyr2LatProfileId(slot),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settingsService = context.read<AppSettingsService>();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChatCompressionScreen(
|
||||
listenable: Listenable.merge([connector, settingsService]),
|
||||
read: () {
|
||||
final hasStorageId = connector.channelIdForSlot(slot) != null;
|
||||
return ChatCompressionState(
|
||||
mode: connector.channelCompressionMode(slot),
|
||||
enabled: hasStorageId,
|
||||
disabledReason: hasStorageId
|
||||
? null
|
||||
: context.l10n.chatCompression_noStorageId,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getChannelCyr2LatProfileId(slot),
|
||||
defaultProfileId:
|
||||
settingsService.settings.selectedCyr2latProfileId,
|
||||
);
|
||||
},
|
||||
onModeChanged: (mode) =>
|
||||
connector.setChannelCompressionMode(slot, mode),
|
||||
onProfileChanged: (id) =>
|
||||
connector.setChannelCyr2LatProfileId(slot, id),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/app_settings.dart';
|
||||
import '../models/chat_compression_mode.dart';
|
||||
import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/mesh_nav_tile.dart';
|
||||
import '../widgets/mesh_ui.dart';
|
||||
|
||||
export '../models/chat_compression_mode.dart';
|
||||
|
||||
String chatCompressionModeLabel(BuildContext context, ChatCompressionMode m) {
|
||||
final l10n = context.l10n;
|
||||
return switch (m) {
|
||||
ChatCompressionMode.off => l10n.chatCompression_off,
|
||||
ChatCompressionMode.smaz => l10n.chatCompression_smaz,
|
||||
ChatCompressionMode.cyr2lat => l10n.chatCompression_cyr2lat,
|
||||
};
|
||||
}
|
||||
|
||||
/// What the page shows for one chat, read fresh each time [listenable] fires.
|
||||
class ChatCompressionState {
|
||||
final ChatCompressionMode mode;
|
||||
|
||||
/// False locks the choices; [disabledReason] says why.
|
||||
final bool enabled;
|
||||
final String? disabledReason;
|
||||
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
|
||||
/// The Cyr2Lat profile saved for this chat, if any.
|
||||
final String? profileId;
|
||||
|
||||
/// The app-wide profile, which sending uses when [profileId] is unset or
|
||||
/// no longer exists.
|
||||
final String? defaultProfileId;
|
||||
|
||||
const ChatCompressionState({
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
this.disabledReason,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
this.defaultProfileId,
|
||||
});
|
||||
|
||||
/// The profile sending actually uses, matching the connector's fallback.
|
||||
String? get effectiveProfileId {
|
||||
bool known(String? id) => profiles.any((p) => p.id == id);
|
||||
if (known(profileId)) return profileId;
|
||||
if (known(defaultProfileId)) return defaultProfileId;
|
||||
return profiles.isEmpty ? null : profiles.first.id;
|
||||
}
|
||||
}
|
||||
|
||||
/// The page behind the chat menu's "Compression: ..." item. Shows the three
|
||||
/// choices with a short note each, plus the Cyr2Lat profile picker.
|
||||
///
|
||||
/// The caller supplies the saved state through [read] (re-read whenever
|
||||
/// [listenable] notifies) and persists changes through the callbacks. A new
|
||||
/// choice shows only once the saved state changes; a callback that throws
|
||||
/// leaves the saved choice in place and shows an error.
|
||||
class ChatCompressionScreen extends StatefulWidget {
|
||||
final Listenable listenable;
|
||||
final ChatCompressionState Function() read;
|
||||
final Future<void> Function(ChatCompressionMode mode) onModeChanged;
|
||||
final Future<void> Function(String profileId) onProfileChanged;
|
||||
|
||||
const ChatCompressionScreen({
|
||||
super.key,
|
||||
required this.listenable,
|
||||
required this.read,
|
||||
required this.onModeChanged,
|
||||
required this.onProfileChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
State<ChatCompressionScreen> createState() => _ChatCompressionScreenState();
|
||||
}
|
||||
|
||||
class _ChatCompressionScreenState extends State<ChatCompressionScreen> {
|
||||
bool _busy = false;
|
||||
bool _failed = false;
|
||||
|
||||
/// Counts failed saves, so the profile picker drops an unsaved choice.
|
||||
int _failures = 0;
|
||||
|
||||
/// Runs one save; a failure keeps the saved state and shows an error.
|
||||
Future<void> _save(Future<void> Function() write) async {
|
||||
if (_busy || !widget.read().enabled) return;
|
||||
setState(() {
|
||||
_busy = true;
|
||||
_failed = false;
|
||||
});
|
||||
var ok = false;
|
||||
try {
|
||||
await write();
|
||||
ok = true;
|
||||
} catch (e) {
|
||||
debugPrint('[ChatCompressionScreen] save failed: $e');
|
||||
}
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_busy = false;
|
||||
_failed = !ok;
|
||||
if (!ok) _failures++;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: AdaptiveAppBarTitle(l10n.chatCompression_title),
|
||||
centerTitle: true,
|
||||
actions: [
|
||||
if (_busy)
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(14),
|
||||
child: SizedBox(
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: ListenableBuilder(
|
||||
listenable: widget.listenable,
|
||||
builder: (context, _) => _buildBody(context, widget.read()),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(BuildContext context, ChatCompressionState view) {
|
||||
final l10n = context.l10n;
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final canChange = view.enabled && !_busy;
|
||||
|
||||
Widget option(ChatCompressionMode mode, String description) {
|
||||
return MeshSheetOption(
|
||||
label: chatCompressionModeLabel(context, mode),
|
||||
subtitle: description,
|
||||
selected: view.mode == mode,
|
||||
onTap: canChange ? () => _save(() => widget.onModeChanged(mode)) : null,
|
||||
);
|
||||
}
|
||||
|
||||
final profileValue = view.effectiveProfileId;
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.only(bottom: 24),
|
||||
children: [
|
||||
if (_failed)
|
||||
MeshCard(
|
||||
color: scheme.errorContainer,
|
||||
borderColor: scheme.errorContainer,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.error_outline, color: scheme.onErrorContainer),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
l10n.chatCompression_saveFailed,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: scheme.onErrorContainer,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!view.enabled && view.disabledReason != null)
|
||||
MeshInfoCard(view.disabledReason!),
|
||||
SectionHeader(
|
||||
l10n.chatCompression_title,
|
||||
description: l10n.chatCompression_sheetSubtitle,
|
||||
),
|
||||
MeshCard(
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
children: [
|
||||
option(
|
||||
ChatCompressionMode.off,
|
||||
l10n.chatCompression_offDescription,
|
||||
),
|
||||
const Divider(height: 1, indent: 16),
|
||||
option(
|
||||
ChatCompressionMode.smaz,
|
||||
l10n.chatCompression_smazDescription,
|
||||
),
|
||||
const Divider(height: 1, indent: 16),
|
||||
option(
|
||||
ChatCompressionMode.cyr2lat,
|
||||
l10n.chatCompression_cyr2latDescription,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (view.mode == ChatCompressionMode.cyr2lat &&
|
||||
view.profiles.isNotEmpty) ...[
|
||||
SectionHeader(l10n.chatCompression_profile),
|
||||
MeshCard(
|
||||
child: DropdownButtonFormField<String>(
|
||||
// The field keeps a picked value internally, so rebuild it
|
||||
// with the saved value after a change or a failure.
|
||||
key: ValueKey('$profileValue#$_failures'),
|
||||
isExpanded: true,
|
||||
initialValue: profileValue,
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.chatCompression_profile,
|
||||
),
|
||||
items: [
|
||||
for (final profile in view.profiles)
|
||||
DropdownMenuItem(
|
||||
value: profile.id,
|
||||
child: Text(profile.name, overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
],
|
||||
onChanged: canChange
|
||||
? (id) {
|
||||
if (id == null || id == profileValue) return;
|
||||
_save(() => widget.onProfileChanged(id));
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
+463
-224
@@ -38,7 +38,6 @@ import '../services/chat_text_scale_service.dart';
|
||||
import '../services/path_history_service.dart';
|
||||
import '../services/translation_service.dart';
|
||||
import '../widgets/chat_composer.dart';
|
||||
import '../widgets/chat_compression_selector.dart';
|
||||
import '../widgets/chat_send_pipeline.dart';
|
||||
import '../widgets/chat_zoom_wrapper.dart';
|
||||
import '../widgets/message_bubble_frame.dart';
|
||||
@@ -46,6 +45,7 @@ import '../widgets/reaction_chips.dart';
|
||||
import '../widgets/chat_day_separator.dart';
|
||||
import 'bookmarks_screen.dart';
|
||||
import 'channel_message_path_screen.dart';
|
||||
import 'chat_compression_screen.dart';
|
||||
import 'contacts_screen.dart' show confirmRemoveContact;
|
||||
import 'map_screen.dart';
|
||||
import 'repeater_hub_screen.dart';
|
||||
@@ -104,6 +104,8 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
bool _focusLostToRoute = false;
|
||||
final GlobalKey _unreadScrollKey = GlobalKey();
|
||||
bool _isLoadingOlder = false;
|
||||
final Set<String> _selectedIds = <String>{};
|
||||
bool get _selecting => _selectedIds.isNotEmpty;
|
||||
MeshCoreConnector? _connector;
|
||||
Message? _pendingUnreadScrollTarget;
|
||||
String? _unreadDividerMessageId;
|
||||
@@ -415,9 +417,14 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopScope(
|
||||
canPop: !_searching,
|
||||
canPop: !_searching && !_selecting,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (!didPop && _searching) _closeSearch();
|
||||
if (didPop) return;
|
||||
if (_selecting) {
|
||||
_clearSelection();
|
||||
} else if (_searching) {
|
||||
_closeSearch();
|
||||
}
|
||||
},
|
||||
child: _buildScaffold(context),
|
||||
);
|
||||
@@ -425,213 +432,243 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
|
||||
Widget _buildScaffold(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: _searching
|
||||
? IconButton(
|
||||
tooltip: context.l10n.chatSearch_close,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: _closeSearch,
|
||||
)
|
||||
: null,
|
||||
title: _searching
|
||||
? _buildSearchField()
|
||||
: Consumer2<PathHistoryService, MeshCoreConnector>(
|
||||
builder: (context, pathService, connector, _) {
|
||||
final contact = _resolveContact(connector);
|
||||
final pathLabel = _currentPathLabel(contact);
|
||||
appBar: _selecting
|
||||
? _buildSelectionAppBar(context)
|
||||
: AppBar(
|
||||
leading: _searching
|
||||
? IconButton(
|
||||
tooltip: context.l10n.chatSearch_close,
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: _closeSearch,
|
||||
)
|
||||
: null,
|
||||
title: _searching
|
||||
? _buildSearchField()
|
||||
: Consumer2<PathHistoryService, MeshCoreConnector>(
|
||||
builder: (context, pathService, connector, _) {
|
||||
final contact = _resolveContact(connector);
|
||||
final pathLabel = _currentPathLabel(contact);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
contact.name,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () =>
|
||||
ContactRoutingSheet.show(context, contact: contact),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 6),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
// Follows the chat text size, capped so the two-line
|
||||
// title still fits the app bar.
|
||||
final textScale = context
|
||||
.select<ChatTextScaleService, double>(
|
||||
(service) => service.scale,
|
||||
)
|
||||
.clamp(1.0, 1.3);
|
||||
return Text(
|
||||
pathLabel,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 12 * textScale,
|
||||
fontWeight: FontWeight.normal,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationStyle: TextDecorationStyle.dotted,
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
contact.name,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => ContactRoutingSheet.show(
|
||||
context,
|
||||
contact: contact,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 6,
|
||||
),
|
||||
);
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
// Follows the chat text size, capped so the two-line
|
||||
// title still fits the app bar.
|
||||
final textScale = context
|
||||
.select<ChatTextScaleService, double>(
|
||||
(service) => service.scale,
|
||||
)
|
||||
.clamp(1.0, 1.3);
|
||||
return Text(
|
||||
pathLabel,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontSize: 12 * textScale,
|
||||
fontWeight: FontWeight.normal,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationStyle:
|
||||
TextDecorationStyle.dotted,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
centerTitle: false,
|
||||
bottom: const SyncProgressAppBarBottom(),
|
||||
actionsPadding: const EdgeInsetsDirectional.only(end: 4),
|
||||
// While searching the field gets the whole bar; the leading arrow
|
||||
// closes the search.
|
||||
actions: _searching
|
||||
? null
|
||||
: [
|
||||
const RadioStatsIconButton(),
|
||||
IconButton(
|
||||
tooltip: context.l10n.chatSearch_tooltip,
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: _openSearch,
|
||||
),
|
||||
Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, _) {
|
||||
final contact = _resolveContact(connector);
|
||||
final isRoom = contact.type == advTypeRoom;
|
||||
final readOnly = isRadioReadOnly(connector);
|
||||
|
||||
return PopupMenuButton<String>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onSelected: (value) {
|
||||
switch (value) {
|
||||
case 'routing':
|
||||
ContactRoutingSheet.show(
|
||||
context,
|
||||
contact: contact,
|
||||
);
|
||||
case 'info':
|
||||
_showContactInfo(context);
|
||||
case 'compression':
|
||||
_openCompressionScreen();
|
||||
case 'settings':
|
||||
_showContactSettings(context);
|
||||
case 'showBookmarks':
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => BookmarksScreen(
|
||||
initialSourceType:
|
||||
BookmarkSourceType.contact,
|
||||
initialSourceId:
|
||||
widget.contact.publicKeyHex,
|
||||
initialSourceName: contact.name,
|
||||
),
|
||||
),
|
||||
);
|
||||
case 'background':
|
||||
showChatBackgroundSheet(
|
||||
context,
|
||||
ChatBackgroundService.contactKey(contact),
|
||||
);
|
||||
case 'telemetry':
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TelemetryScreen(
|
||||
contact: widget.contact,
|
||||
),
|
||||
),
|
||||
);
|
||||
case 'roomManagement':
|
||||
_showRoomManagementLogin(contact);
|
||||
case 'clearChat':
|
||||
_confirmClearChat(context, connector);
|
||||
case 'removeContact':
|
||||
confirmRemoveContact(
|
||||
context,
|
||||
connector,
|
||||
contact,
|
||||
onRemoved: () {
|
||||
if (mounted) Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'routing',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.route,
|
||||
label: context.l10n.routing_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'info',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.info_outline,
|
||||
label: context.l10n.contact_info,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'telemetry',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.bar_chart,
|
||||
label: context.l10n.contact_telemetry,
|
||||
),
|
||||
),
|
||||
if (isRoom)
|
||||
PopupMenuItem(
|
||||
value: 'roomManagement',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.room_preferences,
|
||||
label: context.l10n.room_management,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'compression',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.compress,
|
||||
label: context.l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(
|
||||
context,
|
||||
connector.contactCompressionMode(
|
||||
widget.contact.publicKeyHex,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'settings',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.settings,
|
||||
label: context.l10n.contact_settings,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'showBookmarks',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.bookmark_border,
|
||||
label: context.l10n.bookmarks_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'background',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.wallpaper,
|
||||
label: context.l10n.chatBackground_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'clearChat',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.delete,
|
||||
label: context.l10n.contact_clearChat,
|
||||
color: readOnly
|
||||
? null
|
||||
: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'removeContact',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.person_remove,
|
||||
label:
|
||||
context.l10n.contacts_removeFromContacts,
|
||||
color: readOnly
|
||||
? null
|
||||
: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
centerTitle: false,
|
||||
bottom: const SyncProgressAppBarBottom(),
|
||||
actionsPadding: const EdgeInsetsDirectional.only(end: 4),
|
||||
// While searching the field gets the whole bar; the leading arrow
|
||||
// closes the search.
|
||||
actions: _searching
|
||||
? null
|
||||
: [
|
||||
const RadioStatsIconButton(),
|
||||
IconButton(
|
||||
tooltip: context.l10n.chatSearch_tooltip,
|
||||
icon: const Icon(Icons.search),
|
||||
onPressed: _openSearch,
|
||||
),
|
||||
Consumer<MeshCoreConnector>(
|
||||
builder: (context, connector, _) {
|
||||
final contact = _resolveContact(connector);
|
||||
final isRoom = contact.type == advTypeRoom;
|
||||
final readOnly = isRadioReadOnly(connector);
|
||||
|
||||
return PopupMenuButton<String>(
|
||||
icon: const Icon(Icons.more_vert),
|
||||
onSelected: (value) {
|
||||
switch (value) {
|
||||
case 'routing':
|
||||
ContactRoutingSheet.show(context, contact: contact);
|
||||
case 'info':
|
||||
_showContactInfo(context);
|
||||
case 'settings':
|
||||
_showContactSettings(context);
|
||||
case 'showBookmarks':
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => BookmarksScreen(
|
||||
initialSourceType: BookmarkSourceType.contact,
|
||||
initialSourceId: widget.contact.publicKeyHex,
|
||||
initialSourceName: contact.name,
|
||||
),
|
||||
),
|
||||
);
|
||||
case 'background':
|
||||
showChatBackgroundSheet(
|
||||
context,
|
||||
ChatBackgroundService.contactKey(contact),
|
||||
);
|
||||
case 'telemetry':
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
TelemetryScreen(contact: widget.contact),
|
||||
),
|
||||
);
|
||||
case 'roomManagement':
|
||||
_showRoomManagementLogin(contact);
|
||||
case 'clearChat':
|
||||
_confirmClearChat(context, connector);
|
||||
case 'removeContact':
|
||||
confirmRemoveContact(
|
||||
context,
|
||||
connector,
|
||||
contact,
|
||||
onRemoved: () {
|
||||
if (mounted) Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
value: 'routing',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.route,
|
||||
label: context.l10n.routing_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'info',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.info_outline,
|
||||
label: context.l10n.contact_info,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'telemetry',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.bar_chart,
|
||||
label: context.l10n.contact_telemetry,
|
||||
),
|
||||
),
|
||||
if (isRoom)
|
||||
PopupMenuItem(
|
||||
value: 'roomManagement',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.room_preferences,
|
||||
label: context.l10n.room_management,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'settings',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.settings,
|
||||
label: context.l10n.contact_settings,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'showBookmarks',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.bookmark_border,
|
||||
label: context.l10n.bookmarks_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'background',
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.wallpaper,
|
||||
label: context.l10n.chatBackground_title,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'clearChat',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.delete,
|
||||
label: context.l10n.contact_clearChat,
|
||||
color: readOnly
|
||||
? null
|
||||
: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: 'removeContact',
|
||||
enabled: !readOnly,
|
||||
child: MeshMenuItemRow(
|
||||
icon: Icons.person_remove,
|
||||
label: context.l10n.contacts_removeFromContacts,
|
||||
color: readOnly
|
||||
? null
|
||||
: Theme.of(context).colorScheme.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: _showSearchResults
|
||||
? _buildSearchResults(_loadSearchEntries)
|
||||
: Consumer<MeshCoreConnector>(
|
||||
@@ -650,7 +687,6 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
);
|
||||
return Column(
|
||||
children: [
|
||||
_buildCompressionSelector(connector),
|
||||
Expanded(
|
||||
child: ChatBackdrop(
|
||||
contentKey: _messageAreaKey,
|
||||
@@ -679,22 +715,28 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
|
||||
/// Compression is stored on this phone per contact, so it can change
|
||||
/// while the radio is offline.
|
||||
Widget _buildCompressionSelector(MeshCoreConnector connector) {
|
||||
void _openCompressionScreen() {
|
||||
final keyHex = widget.contact.publicKeyHex;
|
||||
return Consumer<AppSettingsService>(
|
||||
builder: (context, settingsService, _) {
|
||||
return ChatCompressionSelector(
|
||||
mode: connector.contactCompressionMode(keyHex),
|
||||
enabled: true,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getContactCyr2LatProfileId(keyHex),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final settingsService = context.read<AppSettingsService>();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ChatCompressionScreen(
|
||||
listenable: Listenable.merge([connector, settingsService]),
|
||||
read: () => ChatCompressionState(
|
||||
mode: connector.contactCompressionMode(keyHex),
|
||||
enabled: true,
|
||||
profiles: settingsService.settings.cyr2latProfiles,
|
||||
profileId: connector.getContactCyr2LatProfileId(keyHex),
|
||||
defaultProfileId: settingsService.settings.selectedCyr2latProfileId,
|
||||
),
|
||||
onModeChanged: (mode) =>
|
||||
connector.setContactCompressionMode(keyHex, mode),
|
||||
onProfileChanged: (id) =>
|
||||
connector.setContactCyr2LatProfileId(keyHex, id),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -745,6 +787,7 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
});
|
||||
|
||||
return ChatZoomWrapper(
|
||||
enabled: !_selecting,
|
||||
child: AnchoredChatListView.builder(
|
||||
scrollAnchor: _scrollAnchor,
|
||||
reverse: true, // List grows from bottom up
|
||||
@@ -781,12 +824,7 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
if (isRoom) {
|
||||
// Room-server messages carry the original author's 4-byte prefix
|
||||
// separately from message.text; use it only for resolving the name.
|
||||
roomAuthor = _resolveContactFrom4Bytes(
|
||||
connector,
|
||||
message.fourByteRoomContactKey.isEmpty
|
||||
? Uint8List.fromList([0, 0, 0, 0])
|
||||
: message.fourByteRoomContactKey,
|
||||
);
|
||||
roomAuthor = _roomAuthorOf(connector, message);
|
||||
fourByteHex = message.fourByteRoomContactKey
|
||||
.map((b) => b.toRadixString(16).padLeft(2, '0'))
|
||||
.join()
|
||||
@@ -826,7 +864,7 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
message.receivedAt,
|
||||
);
|
||||
final highlighted = message.messageId == _highlightedMessageId;
|
||||
final shown = highlighted
|
||||
final styled = highlighted
|
||||
? AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
decoration: BoxDecoration(
|
||||
@@ -838,6 +876,9 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
child: bubble,
|
||||
)
|
||||
: bubble;
|
||||
final shown = _selecting
|
||||
? _buildSelectableRow(message, styled)
|
||||
: styled;
|
||||
final child = isUnreadAnchor || startsDay
|
||||
? Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -1059,6 +1100,15 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
return connector.contacts[_resolveContactIndex];
|
||||
}
|
||||
|
||||
/// The known author of a room-server post, or null when unknown.
|
||||
Contact? _roomAuthorOf(MeshCoreConnector connector, Message message) =>
|
||||
_resolveContactFrom4Bytes(
|
||||
connector,
|
||||
message.fourByteRoomContactKey.isEmpty
|
||||
? Uint8List.fromList([0, 0, 0, 0])
|
||||
: message.fourByteRoomContactKey,
|
||||
);
|
||||
|
||||
Contact? _resolveContactFrom4Bytes(
|
||||
MeshCoreConnector connector,
|
||||
Uint8List key4Bytes,
|
||||
@@ -1414,6 +1464,14 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
_showEmojiPicker(message, contact);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.checklist),
|
||||
title: Text(context.l10n.chat_selectMessages),
|
||||
onTap: () {
|
||||
Navigator.pop(sheetContext);
|
||||
_toggleSelected(message);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.route),
|
||||
title: Text(context.l10n.chat_path),
|
||||
@@ -1542,6 +1600,187 @@ class _ChatScreenState extends State<ChatScreen> with WidgetsBindingObserver {
|
||||
);
|
||||
}
|
||||
|
||||
// ---- bulk selection -------------------------------------------------------
|
||||
|
||||
void _toggleSelected(Message message) {
|
||||
HapticFeedback.selectionClick();
|
||||
setState(() {
|
||||
if (!_selectedIds.remove(message.messageId)) {
|
||||
_selectedIds.add(message.messageId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void _clearSelection() => setState(_selectedIds.clear);
|
||||
|
||||
/// Selected messages still in the transcript, oldest first.
|
||||
List<Message> _selectedMessages() {
|
||||
final messages = context.read<MeshCoreConnector>().getMessages(
|
||||
widget.contact,
|
||||
);
|
||||
return [
|
||||
for (final m in messages)
|
||||
if (_selectedIds.contains(m.messageId)) m,
|
||||
];
|
||||
}
|
||||
|
||||
Widget _buildSelectableRow(Message message, Widget messageBody) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final selected = _selectedIds.contains(message.messageId);
|
||||
return Semantics(
|
||||
selected: selected,
|
||||
button: true,
|
||||
child: Material(
|
||||
color: selected
|
||||
? scheme.primary.withValues(alpha: 0.16)
|
||||
: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () => _toggleSelected(message),
|
||||
onLongPress: () => _toggleSelected(message),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3, horizontal: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
selected ? Icons.check_circle : Icons.radio_button_unchecked,
|
||||
size: 28,
|
||||
color: selected ? scheme.primary : scheme.onSurfaceVariant,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
// Links, images and reactions inside the bubble must not
|
||||
// react while picking messages.
|
||||
Expanded(child: AbsorbPointer(child: messageBody)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
PreferredSizeWidget _buildSelectionAppBar(BuildContext context) {
|
||||
final l10n = context.l10n;
|
||||
final selected = _selectedMessages();
|
||||
final readOnly = context.radioReadOnly;
|
||||
final canResend =
|
||||
!readOnly && selected.any((m) => m.isOutgoing && !m.isCli);
|
||||
return AppBar(
|
||||
leading: IconButton(
|
||||
tooltip: l10n.chat_clearSelection,
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: _clearSelection,
|
||||
),
|
||||
title: Text(l10n.chat_selectedCount(selected.length)),
|
||||
actions: [
|
||||
if (canResend)
|
||||
IconButton(
|
||||
tooltip: l10n.chat_resend,
|
||||
icon: const Icon(Icons.replay),
|
||||
onPressed: () => _bulkResend(selected),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.chat_bookmark,
|
||||
icon: const Icon(Icons.bookmark_border),
|
||||
onPressed: selected.isEmpty ? null : () => _bulkBookmark(selected),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.common_copy,
|
||||
icon: const Icon(Icons.copy),
|
||||
onPressed: selected.isEmpty ? null : () => _bulkCopy(selected),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: l10n.common_delete,
|
||||
icon: const Icon(Icons.delete_outline),
|
||||
onPressed: selected.isEmpty || readOnly
|
||||
? null
|
||||
: () => _bulkDelete(selected),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
void _bulkCopy(List<Message> messages) {
|
||||
final text = messages.map((m) => m.text).join('\n');
|
||||
setState(_selectedIds.clear);
|
||||
copyChatMessageText(context, text);
|
||||
}
|
||||
|
||||
void _bulkBookmark(List<Message> messages) {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final contact = _resolveContact(connector);
|
||||
final isRoom = contact.type == advTypeRoom;
|
||||
final me = connector.selfName ?? context.l10n.chat_me;
|
||||
setState(_selectedIds.clear);
|
||||
for (final m in messages) {
|
||||
unawaited(
|
||||
connector.setBookmarkedMessage(
|
||||
BookmarkedMessage.fromContact(
|
||||
message: m,
|
||||
contactKey: widget.contact.publicKeyHex,
|
||||
contactName: widget.contact.name,
|
||||
senderName: m.isOutgoing
|
||||
? me
|
||||
: (isRoom ? _roomAuthorOf(connector, m) : null)?.name ??
|
||||
contact.name,
|
||||
),
|
||||
isBookmarked: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _bulkDelete(List<Message> messages) async {
|
||||
if (!ensureRadioConnected(context)) return;
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final confirmed = await confirmBulkDelete(context, messages.length);
|
||||
if (!confirmed || !mounted) return;
|
||||
setState(_selectedIds.clear);
|
||||
for (final m in messages) {
|
||||
await connector.deleteMessage(m);
|
||||
}
|
||||
if (!mounted) return;
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(context.l10n.chat_messagesDeleted(messages.length)),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _bulkResend(List<Message> messages) async {
|
||||
if (!ensureRadioConnected(context)) return;
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
final outgoing = [
|
||||
for (final m in messages)
|
||||
if (m.isOutgoing && !m.isCli) m,
|
||||
];
|
||||
final confirmed = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (dialogContext) {
|
||||
final l10n = dialogContext.l10n;
|
||||
return AlertDialog(
|
||||
title: Text(l10n.chat_resendSelectedTitle),
|
||||
content: Text(l10n.chat_resendSelectedConfirm(outgoing.length)),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(dialogContext, false),
|
||||
child: Text(l10n.common_cancel),
|
||||
),
|
||||
FilledButton(
|
||||
onPressed: () => Navigator.pop(dialogContext, true),
|
||||
child: Text(l10n.chat_resend),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
if (confirmed != true || !mounted) return;
|
||||
final contact = _resolveContact(connector);
|
||||
setState(_selectedIds.clear);
|
||||
// Oldest first so the resent messages keep their order.
|
||||
for (final m in outgoing) {
|
||||
await connector.resendMessage(contact, m);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _deleteMessage(Message message) async {
|
||||
if (!ensureRadioConnected(context)) return;
|
||||
await context.read<MeshCoreConnector>().deleteMessage(message);
|
||||
|
||||
@@ -16,6 +16,7 @@ typedef _ContactForm = ({
|
||||
bool autoAddRoomServers,
|
||||
bool autoAddSensors,
|
||||
bool overwriteOldest,
|
||||
int? maxHops,
|
||||
bool evictDiscovered,
|
||||
});
|
||||
|
||||
@@ -33,6 +34,8 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
late bool _autoAddRoomServers;
|
||||
late bool _autoAddSensors;
|
||||
late bool _overwriteOldest;
|
||||
// Null when the firmware doesn't report a hop limit.
|
||||
int? _maxHops;
|
||||
late bool _evictDiscovered;
|
||||
late _ContactForm _savedForm;
|
||||
|
||||
@@ -45,6 +48,7 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
_autoAddRoomServers = connector.autoAddRoomServers ?? false;
|
||||
_autoAddSensors = connector.autoAddSensors ?? false;
|
||||
_overwriteOldest = connector.autoAddOverwriteOldest ?? false;
|
||||
_maxHops = connector.autoAddMaxHops;
|
||||
_evictDiscovered = context
|
||||
.read<AppSettingsService>()
|
||||
.settings
|
||||
@@ -58,6 +62,7 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
autoAddRoomServers: _autoAddRoomServers,
|
||||
autoAddSensors: _autoAddSensors,
|
||||
overwriteOldest: _overwriteOldest,
|
||||
maxHops: _maxHops,
|
||||
evictDiscovered: _evictDiscovered,
|
||||
);
|
||||
|
||||
@@ -73,6 +78,8 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
autoAddRoomServer: form.autoAddRoomServers,
|
||||
autoAddSensor: form.autoAddSensors,
|
||||
overwriteOldest: form.overwriteOldest,
|
||||
// Sent only when changed, so the frame is otherwise unchanged.
|
||||
maxHops: form.maxHops != _savedForm.maxHops ? form.maxHops : null,
|
||||
),
|
||||
);
|
||||
await connector.sendFrame(buildGetAutoAddFlagsFrame());
|
||||
@@ -168,6 +175,44 @@ class _ContactSettingsScreenState extends State<ContactSettingsScreen> {
|
||||
value: _overwriteOldest,
|
||||
onChanged: (v) => _overwriteOldest = v,
|
||||
),
|
||||
if (_maxHops != null) ...[
|
||||
divider,
|
||||
// Same row shape as SettingsValueSlider: icon, title and
|
||||
// description, with the dropdown under the description.
|
||||
ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 4,
|
||||
),
|
||||
leading: const Icon(Icons.linear_scale, size: 24),
|
||||
title: Text(l10n.contactsSettings_hopLimit),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(l10n.contactsSettings_hopLimitSubtitle),
|
||||
const SizedBox(height: 8),
|
||||
DropdownButtonFormField<int>(
|
||||
initialValue: _maxHops,
|
||||
isExpanded: true,
|
||||
// Firmware: 0 = no limit, N = under N hops (max 64).
|
||||
items: [
|
||||
for (var hops = 0; hops <= 64; hops++)
|
||||
DropdownMenuItem(
|
||||
value: hops,
|
||||
child: Text(
|
||||
l10n.contactsSettings_hopLimitOption(hops),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
onChanged: (v) {
|
||||
if (v != null) setState(() => _maxHops = v);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
divider,
|
||||
_switch(
|
||||
// The Discovered Contacts icon.
|
||||
|
||||
@@ -1,364 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
|
||||
import '../l10n/l10n.dart';
|
||||
import '../models/app_settings.dart';
|
||||
import '../models/chat_compression_mode.dart';
|
||||
import '../theme/mesh_theme.dart';
|
||||
import 'mesh_nav_tile.dart';
|
||||
import 'mesh_ui.dart';
|
||||
|
||||
export '../models/chat_compression_mode.dart';
|
||||
|
||||
/// Always-visible "Compression: Off / SMAZ / Cyr2Lat" strip for the top of a
|
||||
/// DM or channel chat. Tapping it opens one sheet with the three choices,
|
||||
/// what each does, and the Cyr2Lat profile picker.
|
||||
///
|
||||
/// The parent supplies the saved state and persists changes through the
|
||||
/// callbacks; this widget only shows a new mode once the parent rebuilds it
|
||||
/// with that mode. A callback that throws leaves the saved mode in place and
|
||||
/// shows an error in the sheet.
|
||||
class ChatCompressionSelector extends StatefulWidget {
|
||||
final ChatCompressionMode mode;
|
||||
|
||||
/// False disables the strip and the sheet; [disabledReason] says why.
|
||||
final bool enabled;
|
||||
final String? disabledReason;
|
||||
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
|
||||
/// The Cyr2Lat profile saved for this chat, if any.
|
||||
final String? profileId;
|
||||
|
||||
/// The app-wide profile, which sending uses when [profileId] is unset or
|
||||
/// no longer exists.
|
||||
final String? defaultProfileId;
|
||||
|
||||
final Future<void> Function(ChatCompressionMode mode) onModeChanged;
|
||||
final Future<void> Function(String profileId) onProfileChanged;
|
||||
|
||||
const ChatCompressionSelector({
|
||||
super.key,
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
this.disabledReason,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
this.defaultProfileId,
|
||||
required this.onModeChanged,
|
||||
required this.onProfileChanged,
|
||||
});
|
||||
|
||||
/// The profile sending actually uses, matching the connector's fallback.
|
||||
String? get effectiveProfileId {
|
||||
bool known(String? id) => profiles.any((p) => p.id == id);
|
||||
if (known(profileId)) return profileId;
|
||||
if (known(defaultProfileId)) return defaultProfileId;
|
||||
return profiles.isEmpty ? null : profiles.first.id;
|
||||
}
|
||||
|
||||
@override
|
||||
State<ChatCompressionSelector> createState() =>
|
||||
_ChatCompressionSelectorState();
|
||||
}
|
||||
|
||||
String chatCompressionModeLabel(BuildContext context, ChatCompressionMode m) {
|
||||
final l10n = context.l10n;
|
||||
return switch (m) {
|
||||
ChatCompressionMode.off => l10n.chatCompression_off,
|
||||
ChatCompressionMode.smaz => l10n.chatCompression_smaz,
|
||||
ChatCompressionMode.cyr2lat => l10n.chatCompression_cyr2lat,
|
||||
};
|
||||
}
|
||||
|
||||
/// What the open sheet renders. The sheet is a separate route, so it listens
|
||||
/// to this instead of rebuilding with the strip.
|
||||
class _SelectorView {
|
||||
final ChatCompressionMode mode;
|
||||
final bool enabled;
|
||||
final List<Cyr2LatProfile> profiles;
|
||||
final String? profileId;
|
||||
final bool busy;
|
||||
final bool failed;
|
||||
|
||||
/// Counts failed saves, so the profile picker drops an unsaved choice.
|
||||
final int failures;
|
||||
|
||||
const _SelectorView({
|
||||
required this.mode,
|
||||
required this.enabled,
|
||||
required this.profiles,
|
||||
required this.profileId,
|
||||
required this.busy,
|
||||
required this.failed,
|
||||
required this.failures,
|
||||
});
|
||||
}
|
||||
|
||||
class _ChatCompressionSelectorState extends State<ChatCompressionSelector> {
|
||||
late final ValueNotifier<_SelectorView> _view = ValueNotifier(_snapshot());
|
||||
bool _busy = false;
|
||||
bool _failed = false;
|
||||
int _failures = 0;
|
||||
|
||||
_SelectorView _snapshot() => _SelectorView(
|
||||
mode: widget.mode,
|
||||
enabled: widget.enabled,
|
||||
profiles: widget.profiles,
|
||||
profileId: widget.effectiveProfileId,
|
||||
busy: _busy,
|
||||
failed: _failed,
|
||||
failures: _failures,
|
||||
);
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant ChatCompressionSelector oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
// The sheet route is not below this widget, so it can't be marked dirty
|
||||
// during this build.
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) _view.value = _snapshot();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_view.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _setBusy(bool busy, {required bool failed}) {
|
||||
setState(() {
|
||||
_busy = busy;
|
||||
_failed = failed;
|
||||
if (failed) _failures++;
|
||||
});
|
||||
_view.value = _snapshot();
|
||||
}
|
||||
|
||||
/// Runs one save; returns whether it succeeded.
|
||||
Future<bool> _save(Future<void> Function() write) async {
|
||||
if (_busy || !widget.enabled) return false;
|
||||
_setBusy(true, failed: false);
|
||||
var ok = false;
|
||||
try {
|
||||
await write();
|
||||
ok = true;
|
||||
} catch (e) {
|
||||
debugPrint('[ChatCompressionSelector] save failed: $e');
|
||||
}
|
||||
if (mounted) _setBusy(false, failed: !ok);
|
||||
return ok;
|
||||
}
|
||||
|
||||
Future<void> _openSheet() async {
|
||||
if (_failed) _setBusy(false, failed: false);
|
||||
await showMeshSheet<void>(
|
||||
context,
|
||||
builder: (sheetContext) => ValueListenableBuilder<_SelectorView>(
|
||||
valueListenable: _view,
|
||||
builder: (sheetContext, view, _) => _buildSheet(sheetContext, view),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSheet(BuildContext context, _SelectorView view) {
|
||||
final l10n = context.l10n;
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
final canChange = view.enabled && !view.busy;
|
||||
|
||||
MeshSheetOption option(ChatCompressionMode mode, String description) {
|
||||
return MeshSheetOption(
|
||||
label: chatCompressionModeLabel(context, mode),
|
||||
subtitle: description,
|
||||
selected: view.mode == mode,
|
||||
onTap: canChange
|
||||
? () async {
|
||||
final ok = await _save(() => widget.onModeChanged(mode));
|
||||
// Cyr2Lat stays open so its profile can be picked.
|
||||
if (ok && mode != ChatCompressionMode.cyr2lat) {
|
||||
if (context.mounted) Navigator.of(context).maybePop();
|
||||
}
|
||||
}
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
final profileValue = view.profileId;
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
BottomSheetHeader(
|
||||
title: l10n.chatCompression_title,
|
||||
subtitle: l10n.chatCompression_sheetSubtitle,
|
||||
trailing: view.busy
|
||||
? const Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
child: SizedBox(
|
||||
width: 18,
|
||||
height: 18,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
Flexible(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
if (view.failed)
|
||||
Container(
|
||||
margin: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: scheme.errorContainer,
|
||||
borderRadius: BorderRadius.circular(MeshRadii.sm),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
color: scheme.onErrorContainer,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
l10n.chatCompression_saveFailed,
|
||||
style: Theme.of(context).textTheme.bodyMedium
|
||||
?.copyWith(color: scheme.onErrorContainer),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (!view.enabled && widget.disabledReason != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
child: Text(
|
||||
widget.disabledReason!,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.off,
|
||||
l10n.chatCompression_offDescription,
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.smaz,
|
||||
l10n.chatCompression_smazDescription,
|
||||
),
|
||||
option(
|
||||
ChatCompressionMode.cyr2lat,
|
||||
l10n.chatCompression_cyr2latDescription,
|
||||
),
|
||||
if (view.mode == ChatCompressionMode.cyr2lat &&
|
||||
view.profiles.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||
child: DropdownButtonFormField<String>(
|
||||
// The field keeps a picked value internally, so rebuild
|
||||
// it with the saved value after a change or a failure.
|
||||
key: ValueKey('$profileValue#${view.failures}'),
|
||||
isExpanded: true,
|
||||
initialValue: profileValue,
|
||||
decoration: InputDecoration(
|
||||
labelText: l10n.chatCompression_profile,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
items: [
|
||||
for (final profile in view.profiles)
|
||||
DropdownMenuItem(
|
||||
value: profile.id,
|
||||
child: Text(
|
||||
profile.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
onChanged: canChange
|
||||
? (id) {
|
||||
if (id == null || id == profileValue) return;
|
||||
_save(() => widget.onProfileChanged(id));
|
||||
}
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final scheme = theme.colorScheme;
|
||||
final l10n = context.l10n;
|
||||
final label = l10n.chatCompression_label(
|
||||
chatCompressionModeLabel(context, widget.mode),
|
||||
);
|
||||
final reason = widget.enabled ? null : widget.disabledReason;
|
||||
|
||||
// One short row: the chat already leaves little room for messages at
|
||||
// large text sizes, so a disabled strip explains itself in the sheet.
|
||||
return Material(
|
||||
color: scheme.surfaceContainerLow,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: scheme.outlineVariant)),
|
||||
),
|
||||
child: MergeSemantics(
|
||||
child: Semantics(
|
||||
button: true,
|
||||
enabled: !_busy,
|
||||
label: reason == null ? label : '$label. $reason',
|
||||
hint: l10n.chatCompression_changeHint,
|
||||
child: InkWell(
|
||||
onTap: _busy ? null : _openSheet,
|
||||
child: ExcludeSemantics(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(minHeight: 48),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: scheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
if (_busy)
|
||||
const SizedBox(
|
||||
width: 18,
|
||||
height: 18,
|
||||
child: CircularProgressIndicator(strokeWidth: 2),
|
||||
)
|
||||
else
|
||||
Icon(
|
||||
widget.enabled
|
||||
? Icons.arrow_drop_down
|
||||
: Icons.lock_outline,
|
||||
color: scheme.onSurfaceVariant,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,27 @@ import 'package:provider/provider.dart';
|
||||
import '../services/chat_text_scale_service.dart';
|
||||
|
||||
/// Gesture wrapper that exposes two-finger pinch-to-zoom for chat scrollables.
|
||||
/// Double-tap resets the scale. Only the wrapper itself listens to gestures;
|
||||
/// child scrollables keep their normal touch handling.
|
||||
/// Double-tap resets the scale, but only while the text is zoomed (or the
|
||||
/// caller supplies [onDoubleTap]) and [enabled] is true: a double-tap
|
||||
/// recognizer in the gesture arena makes every single tap on the child wait
|
||||
/// 300 ms, so it is left out wherever taps must be instant. Only the wrapper
|
||||
/// itself listens to gestures; child scrollables keep their normal touch
|
||||
/// handling.
|
||||
class ChatZoomWrapper extends StatefulWidget {
|
||||
const ChatZoomWrapper({super.key, required this.child, this.onDoubleTap});
|
||||
const ChatZoomWrapper({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.onDoubleTap,
|
||||
this.enabled = true,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final VoidCallback? onDoubleTap;
|
||||
|
||||
/// When false (e.g. while selecting messages) no double-tap is recognized,
|
||||
/// so taps on the child are never delayed or swallowed.
|
||||
final bool enabled;
|
||||
|
||||
@override
|
||||
State<ChatZoomWrapper> createState() => _ChatZoomWrapperState();
|
||||
}
|
||||
@@ -22,14 +35,21 @@ class _ChatZoomWrapperState extends State<ChatZoomWrapper> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final service = context.read<ChatTextScaleService>();
|
||||
final zoomed = context.select<ChatTextScaleService, bool>(
|
||||
(s) => s.scale != 1.0,
|
||||
);
|
||||
final allowDoubleTap =
|
||||
widget.enabled && (zoomed || widget.onDoubleTap != null);
|
||||
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onDoubleTap: () {
|
||||
service.reset();
|
||||
service.persist();
|
||||
widget.onDoubleTap?.call();
|
||||
},
|
||||
onDoubleTap: allowDoubleTap
|
||||
? () {
|
||||
service.reset();
|
||||
service.persist();
|
||||
widget.onDoubleTap?.call();
|
||||
}
|
||||
: null,
|
||||
onScaleStart: (details) {
|
||||
if (details.pointerCount != 2) return;
|
||||
_startScale = service.scale;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/connector/meshcore_protocol.dart';
|
||||
|
||||
void main() {
|
||||
// CMD_SET_AUTOADD_CONFIG: [cmd][flags][autoadd_max_hops?]. Firmware stores
|
||||
// the third byte (capped at 64) only when it is present.
|
||||
group('buildSetAutoAddConfigFrame', () {
|
||||
Iterable<int> frame({int? maxHops}) => buildSetAutoAddConfigFrame(
|
||||
autoAddChat: true,
|
||||
autoAddRepeater: false,
|
||||
autoAddRoomServer: true,
|
||||
autoAddSensor: false,
|
||||
overwriteOldest: true,
|
||||
maxHops: maxHops,
|
||||
);
|
||||
|
||||
const flags =
|
||||
autoAddChatFlag | autoAddRoomServerFlag | autoAddOverwriteOldestFlag;
|
||||
|
||||
test('omits the hop limit when not given', () {
|
||||
expect(frame(), [cmdSetAutoAddConfig, flags]);
|
||||
});
|
||||
|
||||
test('appends the hop limit, including 0 (no limit)', () {
|
||||
expect(frame(maxHops: 8), [cmdSetAutoAddConfig, flags, 8]);
|
||||
expect(frame(maxHops: 0), [cmdSetAutoAddConfig, flags, 0]);
|
||||
});
|
||||
|
||||
test('caps the hop limit at 64', () {
|
||||
expect(frame(maxHops: 200), [cmdSetAutoAddConfig, flags, 64]);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/helpers/smaz.dart';
|
||||
|
||||
int _utf8Len(String s) => utf8.encode(s).length;
|
||||
|
||||
Uint8List _raw(String s) =>
|
||||
Smaz.compressBytes(Uint8List.fromList(utf8.encode(s)));
|
||||
|
||||
/// Sent size, raw SMAZ size and base64 wire size for [text].
|
||||
({int plain, int raw, int wire, int sent}) _measure(String text) {
|
||||
final raw = _raw(text);
|
||||
return (
|
||||
plain: _utf8Len(text),
|
||||
raw: raw.length,
|
||||
wire: _utf8Len('s:${base64Encode(raw)}'),
|
||||
sent: _utf8Len(Smaz.encodeIfSmaller(text)),
|
||||
);
|
||||
}
|
||||
|
||||
void main() {
|
||||
group('compression results', () {
|
||||
test('lowercase English compresses well', () {
|
||||
const text = 'hello there, how are you doing today?';
|
||||
final m = _measure(text);
|
||||
expect((m.plain, m.raw, m.wire, m.sent), (37, 20, 30, 30));
|
||||
expect(Smaz.encodeIfSmaller(text), startsWith('s:'));
|
||||
});
|
||||
|
||||
test('sentence case compresses, a little less', () {
|
||||
const text = 'Hello there, how are you doing today?';
|
||||
final m = _measure(text);
|
||||
expect((m.plain, m.raw, m.wire, m.sent), (37, 22, 34, 34));
|
||||
expect(Smaz.encodeIfSmaller(text), startsWith('s:'));
|
||||
});
|
||||
|
||||
test('mixed case with many capitals barely compresses', () {
|
||||
const mixed = 'Meeting at Headquarters on Monday afternoon';
|
||||
const lower = 'meeting at headquarters on monday afternoon';
|
||||
expect(_measure(mixed).wire, 42);
|
||||
expect(_measure(mixed).plain, 43);
|
||||
expect(Smaz.encodeIfSmaller(mixed), startsWith('s:'));
|
||||
// The same words in lowercase save far more.
|
||||
expect(_measure(lower).wire, 34);
|
||||
expect(_measure(lower).raw, 24);
|
||||
// Each capital that is not in the codebook costs 2 bytes.
|
||||
expect(_measure(mixed).raw - _measure(lower).raw, 4);
|
||||
});
|
||||
|
||||
test('all caps is longer than the plain text, so it is sent plain', () {
|
||||
const text = 'HELLO THERE, HOW ARE YOU DOING TODAY?';
|
||||
final m = _measure(text);
|
||||
expect((m.plain, m.raw, m.wire, m.sent), (37, 50, 70, 37));
|
||||
expect(Smaz.encodeIfSmaller(text), text);
|
||||
});
|
||||
|
||||
test('a reply prefix costs the same in either case', () {
|
||||
expect(
|
||||
_raw('@[Alice] hello there, how are you?').length,
|
||||
_raw('@[alice] hello there, how are you?').length,
|
||||
);
|
||||
// 34 bytes plain, 34 bytes encoded: not strictly smaller, sent plain.
|
||||
const text = '@[Alice] hello there, how are you?';
|
||||
expect(_measure(text).wire, _measure(text).plain);
|
||||
expect(Smaz.encodeIfSmaller(text), text);
|
||||
});
|
||||
});
|
||||
|
||||
group('non-ASCII text', () {
|
||||
test('Cyrillic round-trips as raw bytes but is sent plain', () {
|
||||
const text = 'Привет, как дела сегодня?';
|
||||
final m = _measure(text);
|
||||
expect((m.plain, m.raw, m.wire, m.sent), (45, 52, 74, 45));
|
||||
expect(Smaz.encodeIfSmaller(text), text);
|
||||
// The byte-level codec is still lossless.
|
||||
expect(utf8.decode(Smaz.decompressBytes(_raw(text))), text);
|
||||
});
|
||||
|
||||
test('emoji survives a compressed round trip', () {
|
||||
const text =
|
||||
'see you soon 😀 the best of luck with the new house and the garden';
|
||||
final encoded = Smaz.encodeIfSmaller(text);
|
||||
expect(encoded, startsWith('s:'));
|
||||
expect(_utf8Len(encoded), lessThan(_utf8Len(text)));
|
||||
expect(Smaz.tryDecodePrefixed(encoded), text);
|
||||
});
|
||||
|
||||
test('a short emoji message is not smaller, so it is sent plain', () {
|
||||
const text = 'see you soon 😀 the best';
|
||||
final m = _measure(text);
|
||||
expect((m.plain, m.raw, m.wire, m.sent), (26, 17, 26, 26));
|
||||
expect(Smaz.encodeIfSmaller(text), text);
|
||||
});
|
||||
});
|
||||
|
||||
group('encodeIfSmaller falls back to plain text', () {
|
||||
test('short strings', () {
|
||||
for (final text in ['hi', 'ok', 'Hello', 'the']) {
|
||||
expect(Smaz.encodeIfSmaller(text), text, reason: text);
|
||||
}
|
||||
});
|
||||
|
||||
test('empty string', () {
|
||||
expect(Smaz.encodeIfSmaller(''), '');
|
||||
});
|
||||
|
||||
test('sent form is never longer than the plain text', () {
|
||||
for (final text in [
|
||||
'a',
|
||||
'Hello',
|
||||
'HELLO THERE, HOW ARE YOU DOING TODAY?',
|
||||
'the quick brown fox jumps over the lazy dog',
|
||||
'Привет, как дела?',
|
||||
'12345 67890',
|
||||
]) {
|
||||
expect(
|
||||
_utf8Len(Smaz.encodeIfSmaller(text)),
|
||||
lessThanOrEqualTo(_utf8Len(text)),
|
||||
reason: text,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
group('round trip', () {
|
||||
test('tryDecodePrefixed restores what encodeIfSmaller produced', () {
|
||||
for (final text in [
|
||||
'hello there, how are you doing today?',
|
||||
'Hello there, how are you doing today?',
|
||||
'Meeting at Headquarters on Monday afternoon',
|
||||
'the quick brown fox jumps over the lazy dog',
|
||||
'@[Alice] hello there, how are you doing today my friend?',
|
||||
]) {
|
||||
final encoded = Smaz.encodeIfSmaller(text);
|
||||
expect(encoded, startsWith('s:'), reason: text);
|
||||
expect(Smaz.tryDecodePrefixed(encoded), text, reason: text);
|
||||
}
|
||||
});
|
||||
|
||||
test('the decoder ignores leading whitespace', () {
|
||||
const text = 'hello there, how are you doing today?';
|
||||
expect(Smaz.tryDecodePrefixed(' ${Smaz.encodeIfSmaller(text)}'), text);
|
||||
});
|
||||
|
||||
test('plain text is not a compressed payload', () {
|
||||
expect(Smaz.tryDecodePrefixed('hello there'), isNull);
|
||||
expect(Smaz.tryDecodePrefixed('s:'), isNull);
|
||||
});
|
||||
});
|
||||
|
||||
group('"s:" guard', () {
|
||||
test('text that already starts with "s:" is never re-encoded', () {
|
||||
const text = 's:hello there, how are you doing today?';
|
||||
expect(Smaz.encodeIfSmaller(text), text);
|
||||
});
|
||||
|
||||
test('plain "s:" text is not mistaken for a compressed payload', () {
|
||||
expect(Smaz.tryDecodePrefixed('s:test'), isNull);
|
||||
expect(Smaz.tryDecodePrefixed('s:hello'), isNull);
|
||||
// Valid base64 that is not what the encoder would have produced.
|
||||
expect(Smaz.tryDecodePrefixed('s:AAAA'), isNull);
|
||||
});
|
||||
|
||||
test('malformed payloads return null instead of throwing', () {
|
||||
expect(Smaz.tryDecodePrefixed('s:!!!!'), isNull);
|
||||
// Truncated verbatim escape (0xFE with no byte after it).
|
||||
expect(Smaz.tryDecodePrefixed('s:${base64Encode([254])}'), isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,626 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:provider/single_child_widget.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:meshcore_open/connector/meshcore_connector.dart';
|
||||
import 'package:meshcore_open/connector/meshcore_protocol.dart';
|
||||
import 'package:meshcore_open/l10n/app_localizations.dart';
|
||||
import 'package:meshcore_open/models/contact.dart';
|
||||
import 'package:meshcore_open/review_mode/review_frames.dart';
|
||||
import 'package:meshcore_open/review_mode/review_radio.dart';
|
||||
import 'package:meshcore_open/screens/channel_chat_screen.dart';
|
||||
import 'package:meshcore_open/screens/chat_screen.dart';
|
||||
import 'package:meshcore_open/services/app_debug_log_service.dart';
|
||||
import 'package:meshcore_open/services/app_settings_service.dart';
|
||||
import 'package:meshcore_open/services/ble_debug_log_service.dart';
|
||||
import 'package:meshcore_open/services/chat_text_scale_service.dart';
|
||||
import 'package:meshcore_open/services/image_codec_service.dart';
|
||||
import 'package:meshcore_open/services/map_tile_cache_service.dart';
|
||||
import 'package:meshcore_open/services/message_retry_service.dart';
|
||||
import 'package:meshcore_open/services/path_history_service.dart';
|
||||
import 'package:meshcore_open/services/received_image_store.dart';
|
||||
import 'package:meshcore_open/services/storage_service.dart';
|
||||
import 'package:meshcore_open/services/timeout_prediction_service.dart';
|
||||
import 'package:meshcore_open/services/translation_service.dart';
|
||||
import 'package:meshcore_open/services/ui_view_state_service.dart';
|
||||
import 'package:meshcore_open/storage/prefs_manager.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
|
||||
/// Multi-select in channels, direct chats and rooms: taps must register
|
||||
/// within 250 ms (no double-tap recognizer may hold them back), and direct
|
||||
/// and room chats offer the same bulk actions as channels.
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
final tempDir = Directory.systemTemp.createTempSync('bulk_selection_test');
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(
|
||||
const MethodChannel('plugins.flutter.io/path_provider'),
|
||||
(call) async => tempDir.path,
|
||||
);
|
||||
|
||||
setUpAll(() async {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
PrefsManager.reset();
|
||||
await PrefsManager.initialize();
|
||||
});
|
||||
|
||||
setUp(() {
|
||||
clipboard = null;
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(SystemChannels.platform, (call) async {
|
||||
if (call.method == 'Clipboard.setData') {
|
||||
clipboard = (call.arguments as Map)['text'] as String?;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
});
|
||||
|
||||
testWidgets('direct and room chats: bulk bookmark saves every selected '
|
||||
'message', (tester) async {
|
||||
// One test for both: a bookmark write started in fake time only finishes
|
||||
// inside that test, and the next write queues behind it.
|
||||
for (final room in [false, true]) {
|
||||
final p = room ? 'room' : 'dm';
|
||||
_view(tester, const Size(400, 800));
|
||||
final (connector, chat) = await _pumpChat(tester, room: room);
|
||||
// Room posts name their author by key prefix; the bookmark must carry
|
||||
// that author's name, not the room server's.
|
||||
final authors = connector.contacts
|
||||
.where((c) => c.type == advTypeChat)
|
||||
.take(2)
|
||||
.toList();
|
||||
final posts = ['by author one', 'by author two'];
|
||||
if (room) {
|
||||
expect(authors, hasLength(2));
|
||||
for (var i = 0; i < 2; i++) {
|
||||
connector.handleFrameForTest(
|
||||
_roomPost(chat, authors[i], posts[i], _stamp++),
|
||||
);
|
||||
}
|
||||
await _settle(tester);
|
||||
}
|
||||
await _enterChatSelection(tester, '$p 8');
|
||||
await tester.tap(
|
||||
find.textContaining('$p 9', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
if (room) {
|
||||
for (final post in posts) {
|
||||
await tester.tap(
|
||||
find.textContaining(post, findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
}
|
||||
}
|
||||
await tester.tap(find.byTooltip('Bookmark'));
|
||||
await _settle(tester);
|
||||
// Bookmarks are stored per radio in the preferences; the writes
|
||||
// started in fake time need real time to finish.
|
||||
final prefs = PrefsManager.instance;
|
||||
String stored() => [
|
||||
for (final key in prefs.getKeys())
|
||||
if (key.startsWith('message_bookmarks_')) prefs.getString(key) ?? '',
|
||||
].join();
|
||||
for (
|
||||
var i = 0;
|
||||
i < 200 && !stored().contains(room ? posts[1] : '$p 9');
|
||||
i++
|
||||
) {
|
||||
await tester.runAsync(
|
||||
() => Future<void>.delayed(const Duration(milliseconds: 50)),
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 50));
|
||||
}
|
||||
final saved = stored();
|
||||
expect(saved, contains('"text":"$p 8"'));
|
||||
expect(saved, contains('"text":"$p 9"'));
|
||||
expect(saved, isNot(contains('"text":"$p 7"')));
|
||||
if (room) {
|
||||
for (var i = 0; i < 2; i++) {
|
||||
final entry = RegExp(
|
||||
'\\{[^{}]*"text":"${posts[i]}"[^{}]*\\}',
|
||||
).firstMatch(saved)?.group(0);
|
||||
expect(entry, isNotNull, reason: 'missing ${posts[i]}');
|
||||
expect(entry, contains('"senderName":"${authors[i].name}"'));
|
||||
expect(entry, isNot(contains('"senderName":"${chat.name}"')));
|
||||
}
|
||||
}
|
||||
expect(find.textContaining('selected'), findsNothing);
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
}
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
group('instant selection taps', () {
|
||||
testWidgets('channel: a tap selects within 250 ms and two taps 100 ms '
|
||||
'apart both select', (tester) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChannel(tester);
|
||||
await _enterChannelSelection(tester);
|
||||
expect(find.text('1 selected'), findsOneWidget);
|
||||
|
||||
await tester.tap(
|
||||
find.textContaining('History 38', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
await tester.tap(
|
||||
find.textContaining('History 37', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('3 selected'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.check_circle), findsNWidgets(3));
|
||||
|
||||
// A lone tap needs no extra time either.
|
||||
await tester.tap(
|
||||
find.textContaining('History 36', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.byIcon(Icons.check_circle), findsNWidgets(4));
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('channel: a single frame after the tap already shows it', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChannel(tester);
|
||||
await _enterChannelSelection(tester);
|
||||
await tester.tap(
|
||||
find.textContaining('History 38', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump();
|
||||
expect(find.byIcon(Icons.check_circle), findsNWidgets(2));
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('direct chat: taps select within 250 ms', (tester) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
final dm = await _pumpChat(tester, room: false);
|
||||
await _enterChatSelection(tester, 'dm 9');
|
||||
await tester.tap(
|
||||
find.textContaining('dm 8', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
await tester.tap(
|
||||
find.textContaining('dm 7', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('3 selected'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.check_circle), findsNWidgets(3));
|
||||
expect(dm.$1.getMessages(dm.$2), isNotEmpty);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('room chat: taps select within 250 ms', (tester) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChat(tester, room: true);
|
||||
await _enterChatSelection(tester, 'room 9');
|
||||
await tester.tap(
|
||||
find.textContaining('room 8', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
await tester.tap(
|
||||
find.textContaining('room 7', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('3 selected'), findsOneWidget);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('long press on a row toggles it while selecting', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChat(tester, room: false);
|
||||
await _enterChatSelection(tester, 'dm 9');
|
||||
await tester.longPress(
|
||||
find.textContaining('dm 8', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('2 selected'), findsOneWidget);
|
||||
await tester.longPress(
|
||||
find.textContaining('dm 8', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('1 selected'), findsOneWidget);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
});
|
||||
|
||||
for (final room in [false, true]) {
|
||||
final name = room ? 'room chat' : 'direct chat';
|
||||
final p = room ? 'room' : 'dm';
|
||||
|
||||
group('$name bulk actions', () {
|
||||
testWidgets('back clears the selection instead of leaving', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChat(tester, room: room);
|
||||
await _enterChatSelection(tester, '$p 9');
|
||||
await tester.tap(
|
||||
find.textContaining('$p 8', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.text('2 selected'), findsOneWidget);
|
||||
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(find.textContaining('selected'), findsNothing);
|
||||
expect(find.byType(ChatScreen), findsOneWidget);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('copy puts the selected messages oldest first', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
await _pumpChat(tester, room: room);
|
||||
await _enterChatSelection(tester, '$p 8');
|
||||
await tester.tap(
|
||||
find.textContaining('$p 5', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.tap(
|
||||
find.textContaining('$p 9', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
await tester.tap(find.byTooltip('Copy'));
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(clipboard, '$p 5\n$p 8\n$p 9');
|
||||
expect(find.textContaining('selected'), findsNothing);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('delete asks first, then removes the selected messages', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
final (connector, contact) = await _pumpChat(tester, room: room);
|
||||
await _enterChatSelection(tester, '$p 8');
|
||||
await tester.tap(
|
||||
find.textContaining('$p 9', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
await tester.tap(find.byTooltip('Delete'));
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(
|
||||
find.text('Delete 2 messages from this device?'),
|
||||
findsOneWidget,
|
||||
);
|
||||
await tester.tap(find.text('Delete'));
|
||||
await tester.runAsync(
|
||||
() => Future<void>.delayed(const Duration(milliseconds: 100)),
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
final texts = connector.getMessages(contact).map((m) => m.text);
|
||||
expect(texts, isNot(contains('$p 8')));
|
||||
expect(texts, isNot(contains('$p 9')));
|
||||
expect(texts, contains('$p 7'));
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('resend confirms, cancel does nothing, confirm resends', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(400, 800));
|
||||
final (connector, contact) = await _pumpChat(
|
||||
tester,
|
||||
room: room,
|
||||
outgoing: true,
|
||||
);
|
||||
List<String> ids() => [
|
||||
for (final m in connector.getMessages(contact))
|
||||
if (m.isOutgoing) m.messageId,
|
||||
];
|
||||
final before = ids();
|
||||
expect(before, hasLength(2));
|
||||
|
||||
await _enterChatSelection(tester, '$p out 1');
|
||||
await tester.tap(
|
||||
find.textContaining('$p out 2', findRichText: true),
|
||||
warnIfMissed: false,
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
await tester.tap(find.byTooltip('Resend'));
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(
|
||||
find.text('Resend 2 selected outgoing messages to this contact?'),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.text('Cancel'));
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(ids(), before);
|
||||
expect(find.text('2 selected'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byTooltip('Resend'));
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
await tester.tap(find.widgetWithText(FilledButton, 'Resend'));
|
||||
await tester.runAsync(
|
||||
() => Future<void>.delayed(const Duration(milliseconds: 300)),
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
final after = ids();
|
||||
expect(after, hasLength(2));
|
||||
expect(after, isNot(before));
|
||||
expect(find.textContaining('selected'), findsNothing);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
group('no overflow at 320 dp', () {
|
||||
for (final scale in [1.3, 2.0]) {
|
||||
testWidgets('channel selection bar at ${scale}x text', (tester) async {
|
||||
_view(tester, const Size(320, 700));
|
||||
await _pumpChannel(tester, textScale: scale);
|
||||
await _enterChannelSelection(tester);
|
||||
await tester.tap(find.byIcon(Icons.radio_button_unchecked).first);
|
||||
await tester.pump(const Duration(milliseconds: 250));
|
||||
expect(tester.takeException(), isNull);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
|
||||
testWidgets('direct chat selection bar at ${scale}x text', (
|
||||
tester,
|
||||
) async {
|
||||
_view(tester, const Size(320, 700));
|
||||
await _pumpChat(tester, room: false, outgoing: true, textScale: scale);
|
||||
await _enterChatSelection(tester, 'dm out 2');
|
||||
expect(find.byTooltip('Resend'), findsOneWidget);
|
||||
expect(find.byTooltip('Delete'), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
await _tearDown(tester);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// A room-server post: a signed contact message whose 4-byte "signature" is
|
||||
/// the author's public key prefix.
|
||||
Uint8List _roomPost(Contact room, Contact author, String text, int stamp) {
|
||||
final writer = BufferWriter();
|
||||
writer.writeByte(respCodeContactMsgRecvV3);
|
||||
writer.writeByte(24);
|
||||
writer.writeByte(0);
|
||||
writer.writeByte(0);
|
||||
writer.writeBytes(Uint8List.fromList(room.publicKey.sublist(0, 6)));
|
||||
writer.writeByte(0xFF);
|
||||
writer.writeByte(txtTypeSigned);
|
||||
writer.writeUInt32LE(stamp);
|
||||
writer.writeBytes(Uint8List.fromList(author.publicKey.sublist(0, 4)));
|
||||
writer.writeString(text);
|
||||
writer.writeByte(0);
|
||||
return writer.toBytes();
|
||||
}
|
||||
|
||||
String? clipboard;
|
||||
|
||||
void _view(WidgetTester tester, Size size) {
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1.0;
|
||||
addTearDown(tester.view.reset);
|
||||
}
|
||||
|
||||
Future<void> _settle(WidgetTester tester) async {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
await tester.pump(const Duration(milliseconds: 100));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _tearDown(WidgetTester tester) async {
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
// Let writes started during the test finish, so they cannot stall the
|
||||
// next test's preferences writes.
|
||||
for (var i = 0; i < 20; i++) {
|
||||
await tester.runAsync(
|
||||
() => Future<void>.delayed(const Duration(milliseconds: 25)),
|
||||
);
|
||||
await tester.pump(const Duration(milliseconds: 25));
|
||||
}
|
||||
await tester.pump(const Duration(minutes: 1));
|
||||
}
|
||||
|
||||
/// Opens the message action sheet for the message showing [text] (by calling
|
||||
/// its long-press handler: a real long press on bubble text starts text
|
||||
/// selection in tests) and picks "Select messages".
|
||||
Future<void> _enterSelectionFrom(WidgetTester tester, Finder message) async {
|
||||
final target = tester.getCenter(message);
|
||||
final detector = find
|
||||
.byWidgetPredicate((w) => w is GestureDetector && w.onLongPress != null)
|
||||
.evaluate()
|
||||
.firstWhere((e) {
|
||||
final box = e.renderObject! as RenderBox;
|
||||
// Full-width detectors: match on the message's row, not its text.
|
||||
return (box.localToGlobal(box.size.center(Offset.zero)).dy - target.dy)
|
||||
.abs() <
|
||||
20;
|
||||
});
|
||||
(detector.widget as GestureDetector).onLongPress!();
|
||||
await _settle(tester);
|
||||
await tester.ensureVisible(find.text('Select messages'));
|
||||
await tester.pump();
|
||||
await tester.tap(find.text('Select messages'));
|
||||
await _settle(tester);
|
||||
}
|
||||
|
||||
Future<void> _enterChannelSelection(WidgetTester tester) => _enterSelectionFrom(
|
||||
tester,
|
||||
find.textContaining('History 39', findRichText: true),
|
||||
);
|
||||
|
||||
Future<void> _enterChatSelection(WidgetTester tester, String text) =>
|
||||
_enterSelectionFrom(tester, find.textContaining(text, findRichText: true));
|
||||
|
||||
(MeshCoreConnector, List<SingleChildWidget>)? _shared;
|
||||
|
||||
Widget _app(List<SingleChildWidget> providers, Widget home, double textScale) =>
|
||||
MultiProvider(
|
||||
providers: providers,
|
||||
child: MaterialApp(
|
||||
theme: MeshTheme.light(),
|
||||
locale: const Locale('en'),
|
||||
localizationsDelegates: const [
|
||||
AppLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
builder: (context, child) => MediaQuery(
|
||||
data: MediaQuery.of(
|
||||
context,
|
||||
).copyWith(textScaler: TextScaler.linear(textScale)),
|
||||
child: child!,
|
||||
),
|
||||
home: home,
|
||||
),
|
||||
);
|
||||
|
||||
var _stamp = DateTime.now().millisecondsSinceEpoch ~/ 1000 - 100000;
|
||||
|
||||
Future<MeshCoreConnector> _pumpChannel(
|
||||
WidgetTester tester, {
|
||||
double textScale = 1.0,
|
||||
}) async {
|
||||
final (connector, providers) = _shared ??= await _connect(tester);
|
||||
final channel = connector.channels[0];
|
||||
if (connector.getChannelMessages(channel).length < 40) {
|
||||
for (var i = 0; i < 40; i++) {
|
||||
connector.handleFrameForTest(
|
||||
ReviewFrames.channelMessage(
|
||||
channelIndex: channel.index,
|
||||
sender: 'Alice',
|
||||
message: 'History $i',
|
||||
timestampSecs: _stamp + i * 60,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
await tester.pumpWidget(
|
||||
_app(providers, ChannelChatScreen(channel: channel), textScale),
|
||||
);
|
||||
await _settle(tester);
|
||||
return connector;
|
||||
}
|
||||
|
||||
/// Shows a direct chat (or the review radio's room) holding ten incoming
|
||||
/// messages "dm 0".."dm 9" / "room 0".."room 9", plus two outgoing ones when
|
||||
/// [outgoing].
|
||||
Future<(MeshCoreConnector, Contact)> _pumpChat(
|
||||
WidgetTester tester, {
|
||||
required bool room,
|
||||
bool outgoing = false,
|
||||
double textScale = 1.0,
|
||||
bool fresh = false,
|
||||
}) async {
|
||||
final (connector, providers) = fresh
|
||||
? await _connect(tester)
|
||||
: (_shared ??= await _connect(tester));
|
||||
final contact = connector.contacts.firstWhere(
|
||||
(c) => room ? c.type == advTypeRoom : c.type == advTypeChat,
|
||||
);
|
||||
final p = room ? 'room' : 'dm';
|
||||
connector.clearMessagesForContact(contact);
|
||||
await tester.runAsync(() => connector.flushPendingWrites());
|
||||
for (var i = 0; i < 10; i++) {
|
||||
connector.handleFrameForTest(
|
||||
ReviewFrames.contactMessage(
|
||||
senderPublicKey: contact.publicKey,
|
||||
text: '$p $i',
|
||||
timestampSecs: _stamp++,
|
||||
),
|
||||
);
|
||||
}
|
||||
if (outgoing) {
|
||||
await tester.runAsync(() async {
|
||||
await connector.sendMessage(contact, '$p out 1');
|
||||
await connector.sendMessage(contact, '$p out 2');
|
||||
});
|
||||
}
|
||||
connector.markContactRead(contact.publicKeyHex);
|
||||
await tester.pumpWidget(
|
||||
_app(providers, ChatScreen(contact: contact), textScale),
|
||||
);
|
||||
await _settle(tester);
|
||||
return (connector, contact);
|
||||
}
|
||||
|
||||
Future<(MeshCoreConnector, List<SingleChildWidget>)> _connect(
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
final storage = StorageService();
|
||||
final connector = MeshCoreConnector();
|
||||
final retry = MessageRetryService();
|
||||
final settings = AppSettingsService();
|
||||
final translation = TranslationService(settings);
|
||||
await tester.runAsync(() async {
|
||||
await settings.loadSettings();
|
||||
connector.initialize(
|
||||
retryService: retry,
|
||||
pathHistoryService: PathHistoryService(storage),
|
||||
appSettingsService: settings,
|
||||
translationService: translation,
|
||||
);
|
||||
connector.reviewRadioFactoryForTest = () => ReviewRadio(
|
||||
scheduledMessageInterval: const Duration(hours: 1),
|
||||
ackDelay: const Duration(hours: 1),
|
||||
replyDelay: const Duration(hours: 1),
|
||||
);
|
||||
await connector.connectReview();
|
||||
final end = DateTime.now().add(const Duration(seconds: 8));
|
||||
while ((!connector.contacts.any((c) => c.type == advTypeRoom) ||
|
||||
!connector.contacts.any((c) => c.type == advTypeChat) ||
|
||||
connector.channels.length < 2) &&
|
||||
DateTime.now().isBefore(end)) {
|
||||
await Future<void>.delayed(const Duration(milliseconds: 25));
|
||||
}
|
||||
await Future<void>.delayed(const Duration(milliseconds: 500));
|
||||
});
|
||||
expect(connector.channels.length, greaterThanOrEqualTo(2));
|
||||
|
||||
return (
|
||||
connector,
|
||||
<SingleChildWidget>[
|
||||
ChangeNotifierProvider.value(value: connector),
|
||||
ChangeNotifierProvider.value(value: retry),
|
||||
ChangeNotifierProvider.value(value: PathHistoryService(storage)),
|
||||
ChangeNotifierProvider.value(value: settings),
|
||||
ChangeNotifierProvider.value(value: BleDebugLogService()),
|
||||
ChangeNotifierProvider.value(value: AppDebugLogService()),
|
||||
ChangeNotifierProvider.value(value: ChatTextScaleService()),
|
||||
ChangeNotifierProvider.value(value: translation),
|
||||
ChangeNotifierProvider.value(value: UiViewStateService()),
|
||||
Provider.value(value: storage),
|
||||
ChangeNotifierProvider.value(
|
||||
value: MapTileCacheService(appSettingsService: settings),
|
||||
),
|
||||
ChangeNotifierProvider.value(value: TimeoutPredictionService(storage)),
|
||||
ChangeNotifierProvider.value(value: ImageCodecService(settings)),
|
||||
ChangeNotifierProvider.value(value: ReceivedImageStore()),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,265 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/l10n/app_localizations.dart';
|
||||
import 'package:meshcore_open/models/app_settings.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
import 'package:meshcore_open/screens/chat_compression_screen.dart';
|
||||
|
||||
final _l10n = lookupAppLocalizations(const Locale('en'));
|
||||
|
||||
final _profiles = [
|
||||
Cyr2LatProfile(id: 'ru', name: 'Russian', charMap: const {'А': 'A'}),
|
||||
Cyr2LatProfile(id: 'sr', name: 'Serbian', charMap: const {'З': '3'}),
|
||||
];
|
||||
|
||||
/// Stands in for a chat screen: keeps the "saved" state and applies a change
|
||||
/// only when the test completes the pending write.
|
||||
class _Host extends ChangeNotifier {
|
||||
ChatCompressionMode mode;
|
||||
String? profileId;
|
||||
final bool enabled;
|
||||
final List<ChatCompressionMode> modeCalls = [];
|
||||
final List<String> profileCalls = [];
|
||||
final List<Completer<void>> pending = [];
|
||||
|
||||
_Host({
|
||||
this.mode = ChatCompressionMode.off,
|
||||
this.enabled = true,
|
||||
this.profileId,
|
||||
});
|
||||
|
||||
ChatCompressionState read() => ChatCompressionState(
|
||||
mode: mode,
|
||||
enabled: enabled,
|
||||
disabledReason: enabled ? null : _l10n.chatCompression_noStorageId,
|
||||
profiles: _profiles,
|
||||
profileId: profileId,
|
||||
defaultProfileId: 'ru',
|
||||
);
|
||||
|
||||
Future<void> _write(void Function() apply) async {
|
||||
final completer = Completer<void>();
|
||||
pending.add(completer);
|
||||
await completer.future;
|
||||
apply();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> setMode(ChatCompressionMode m) {
|
||||
modeCalls.add(m);
|
||||
return _write(() => mode = m);
|
||||
}
|
||||
|
||||
Future<void> setProfile(String id) {
|
||||
profileCalls.add(id);
|
||||
return _write(() => profileId = id);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
late _Host host;
|
||||
|
||||
Future<void> pumpPage(
|
||||
WidgetTester tester, {
|
||||
ChatCompressionMode mode = ChatCompressionMode.off,
|
||||
bool enabled = true,
|
||||
String? profileId,
|
||||
Size size = const Size(400, 800),
|
||||
double textScale = 1.0,
|
||||
}) async {
|
||||
host = _Host(mode: mode, enabled: enabled, profileId: profileId);
|
||||
addTearDown(host.dispose);
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1.0;
|
||||
addTearDown(tester.view.reset);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: MeshTheme.light(),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
builder: (context, child) => MediaQuery(
|
||||
data: MediaQuery.of(
|
||||
context,
|
||||
).copyWith(textScaler: TextScaler.linear(textScale)),
|
||||
child: child!,
|
||||
),
|
||||
home: ChatCompressionScreen(
|
||||
listenable: host,
|
||||
read: host.read,
|
||||
onModeChanged: host.setMode,
|
||||
onProfileChanged: host.setProfile,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Finder optionRow(String label) =>
|
||||
find.ancestor(of: find.text(label), matching: find.byType(ListTile));
|
||||
|
||||
bool isSelected(String label) {
|
||||
return find
|
||||
.descendant(
|
||||
of: optionRow(label),
|
||||
matching: find.byIcon(Icons.radio_button_checked),
|
||||
)
|
||||
.evaluate()
|
||||
.isNotEmpty;
|
||||
}
|
||||
|
||||
testWidgets(
|
||||
'lists the three modes with short notes and marks the saved one',
|
||||
(tester) async {
|
||||
await pumpPage(tester, mode: ChatCompressionMode.smaz);
|
||||
|
||||
expect(find.text(_l10n.chatCompression_title), findsWidgets);
|
||||
expect(find.text(_l10n.chatCompression_off), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_smaz), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_cyr2lat), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_offDescription), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_smazDescription), findsOneWidget);
|
||||
expect(
|
||||
find.text(_l10n.chatCompression_cyr2latDescription),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(isSelected(_l10n.chatCompression_smaz), isTrue);
|
||||
expect(isSelected(_l10n.chatCompression_off), isFalse);
|
||||
expect(find.text(_l10n.chatCompression_profile), findsNothing);
|
||||
for (final mode in [
|
||||
_l10n.chatCompression_off,
|
||||
_l10n.chatCompression_smaz,
|
||||
_l10n.chatCompression_cyr2lat,
|
||||
]) {
|
||||
expect(
|
||||
tester.getSize(optionRow(mode)).height,
|
||||
greaterThanOrEqualTo(48),
|
||||
reason: mode,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('a choice shows only after it is saved', (tester) async {
|
||||
await pumpPage(tester);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_smaz));
|
||||
await tester.pump();
|
||||
expect(host.modeCalls, [ChatCompressionMode.smaz]);
|
||||
// Still saving: old mode shown, options locked against rapid taps.
|
||||
expect(isSelected(_l10n.chatCompression_off), isTrue);
|
||||
expect(
|
||||
tester.widget<ListTile>(optionRow(_l10n.chatCompression_cyr2lat)).enabled,
|
||||
isFalse,
|
||||
);
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
expect(host.modeCalls, [ChatCompressionMode.smaz]);
|
||||
|
||||
host.pending.single.complete();
|
||||
await tester.pumpAndSettle();
|
||||
expect(isSelected(_l10n.chatCompression_smaz), isTrue);
|
||||
expect(isSelected(_l10n.chatCompression_off), isFalse);
|
||||
expect(
|
||||
tester.widget<ListTile>(optionRow(_l10n.chatCompression_cyr2lat)).enabled,
|
||||
isTrue,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('Cyr2Lat reveals the profile picker', (tester) async {
|
||||
await pumpPage(tester);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
host.pending.removeAt(0).complete();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(isSelected(_l10n.chatCompression_cyr2lat), isTrue);
|
||||
expect(find.text(_l10n.chatCompression_profile), findsWidgets);
|
||||
// No profile saved for the chat: the app-wide one is what sending uses.
|
||||
expect(find.text('Russian'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Serbian').last);
|
||||
await tester.pump();
|
||||
expect(host.profileCalls, ['sr']);
|
||||
host.pending.removeAt(0).complete();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Serbian'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a failed save keeps the saved mode and says so', (tester) async {
|
||||
await pumpPage(tester, mode: ChatCompressionMode.smaz);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
host.pending.single.completeError(StateError('disk full'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_saveFailed), findsOneWidget);
|
||||
expect(isSelected(_l10n.chatCompression_smaz), isTrue);
|
||||
expect(isSelected(_l10n.chatCompression_cyr2lat), isFalse);
|
||||
expect(
|
||||
tester.widget<ListTile>(optionRow(_l10n.chatCompression_off)).enabled,
|
||||
isTrue,
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('a failed profile save shows the saved profile again', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpPage(tester, mode: ChatCompressionMode.cyr2lat, profileId: 'ru');
|
||||
|
||||
await tester.tap(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Serbian').last);
|
||||
await tester.pump();
|
||||
expect(host.profileCalls, ['sr']);
|
||||
host.pending.single.completeError(StateError('disk full'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_saveFailed), findsOneWidget);
|
||||
await tester.scrollUntilVisible(find.text('Russian'), 100);
|
||||
expect(find.text('Russian'), findsOneWidget);
|
||||
expect(find.text('Serbian'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('disabled shows the saved mode, says why and allows no change', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpPage(tester, mode: ChatCompressionMode.smaz, enabled: false);
|
||||
|
||||
expect(find.text(_l10n.chatCompression_noStorageId), findsOneWidget);
|
||||
expect(isSelected(_l10n.chatCompression_smaz), isTrue);
|
||||
for (final mode in [
|
||||
_l10n.chatCompression_off,
|
||||
_l10n.chatCompression_smaz,
|
||||
_l10n.chatCompression_cyr2lat,
|
||||
]) {
|
||||
expect(tester.widget<ListTile>(optionRow(mode)).enabled, isFalse);
|
||||
}
|
||||
await tester.tap(find.text(_l10n.chatCompression_off), warnIfMissed: false);
|
||||
await tester.pumpAndSettle();
|
||||
expect(host.modeCalls, isEmpty);
|
||||
});
|
||||
|
||||
for (final scale in [1.3, 2.0]) {
|
||||
testWidgets('fits a 320dp phone at ${scale}x text', (tester) async {
|
||||
await pumpPage(
|
||||
tester,
|
||||
mode: ChatCompressionMode.cyr2lat,
|
||||
size: const Size(320, 568),
|
||||
textScale: scale,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
// The page scrolls to its last option and the profile picker.
|
||||
await tester.scrollUntilVisible(
|
||||
find.byType(DropdownButtonFormField<String>),
|
||||
200,
|
||||
scrollable: find.byType(Scrollable).first,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -42,9 +42,8 @@ import 'package:meshcore_open/storage/last_radio_store.dart';
|
||||
import 'package:meshcore_open/storage/message_store.dart';
|
||||
import 'package:meshcore_open/storage/prefs_manager.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
import 'package:meshcore_open/widgets/chat_background.dart';
|
||||
import 'package:meshcore_open/widgets/chat_composer.dart';
|
||||
import 'package:meshcore_open/widgets/chat_compression_selector.dart';
|
||||
import 'package:meshcore_open/screens/chat_compression_screen.dart';
|
||||
import 'package:meshcore_open/widgets/connect_sheet.dart';
|
||||
|
||||
final _radioKey = Uint8List.fromList(List<int>.generate(32, (i) => 0xA0 + i));
|
||||
@@ -349,10 +348,18 @@ void main() {
|
||||
await tester.pump(const Duration(minutes: 1));
|
||||
});
|
||||
|
||||
group('compression selector', () {
|
||||
Future<void> choose(WidgetTester tester, String mode) async {
|
||||
await tester.tap(find.byType(ChatCompressionSelector));
|
||||
group('compression menu item', () {
|
||||
Future<void> openMenu(WidgetTester tester) async {
|
||||
await tester.tap(find.byIcon(Icons.more_vert));
|
||||
await _settle(tester);
|
||||
}
|
||||
|
||||
/// Opens the page from the overflow menu, picks [mode], and returns.
|
||||
Future<void> choose(WidgetTester tester, String mode) async {
|
||||
await openMenu(tester);
|
||||
await tester.tap(find.textContaining('${_l10n.chatCompression_title}:'));
|
||||
await _settle(tester);
|
||||
expect(find.byType(ChatCompressionScreen), findsOneWidget);
|
||||
await tester.tap(find.text(mode));
|
||||
await _settle(tester);
|
||||
// Connector notifications are debounced on a real timer.
|
||||
@@ -360,9 +367,11 @@ void main() {
|
||||
() => Future<void>.delayed(const Duration(milliseconds: 200)),
|
||||
);
|
||||
await _settle(tester);
|
||||
await tester.pageBack();
|
||||
await _settle(tester);
|
||||
}
|
||||
|
||||
testWidgets('DM chat shows it at the top and saves offline', (
|
||||
testWidgets('DM chat shows it in the menu and saves offline', (
|
||||
tester,
|
||||
) async {
|
||||
final connector = await _offlineConnector(tester);
|
||||
@@ -373,32 +382,27 @@ void main() {
|
||||
);
|
||||
await _settle(tester);
|
||||
|
||||
expect(find.byType(ChatCompressionSelector), findsOneWidget);
|
||||
// No strip above the transcript any more.
|
||||
expect(find.byType(ChatCompressionScreen), findsNothing);
|
||||
expect(find.text(_l10n.chatCompression_label('Off')), findsNothing);
|
||||
await openMenu(tester);
|
||||
expect(find.text(_l10n.chatCompression_label('Off')), findsOneWidget);
|
||||
// Above the transcript, outside its scroll view.
|
||||
expect(
|
||||
find.ancestor(
|
||||
of: find.byType(ChatCompressionSelector),
|
||||
matching: find.byType(Scrollable),
|
||||
),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
tester.getBottomLeft(find.byType(ChatCompressionSelector)).dy,
|
||||
lessThanOrEqualTo(tester.getTopLeft(find.byType(ChatBackdrop)).dy),
|
||||
);
|
||||
expect(find.byIcon(Icons.compress), findsOneWidget);
|
||||
await tester.tapAt(const Offset(1, 1));
|
||||
await _settle(tester);
|
||||
|
||||
await choose(tester, _l10n.chatCompression_smaz);
|
||||
await openMenu(tester);
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
await tester.tapAt(const Offset(1, 1));
|
||||
await _settle(tester);
|
||||
expect(
|
||||
await tester.runAsync(() => store.loadSmazEnabled(alice.publicKeyHex)),
|
||||
isTrue,
|
||||
);
|
||||
|
||||
await choose(tester, _l10n.chatCompression_cyr2lat);
|
||||
// Cyr2Lat keeps the sheet open for its profile picker.
|
||||
await tester.tap(find.byTooltip('Close'));
|
||||
await _settle(tester);
|
||||
await openMenu(tester);
|
||||
expect(find.text(_l10n.chatCompression_label('Cyr2Lat')), findsOneWidget);
|
||||
expect(
|
||||
connector.contactCompressionMode(alice.publicKeyHex),
|
||||
@@ -416,8 +420,6 @@ void main() {
|
||||
);
|
||||
|
||||
// The settings dialog no longer carries the compression switches.
|
||||
await tester.tap(find.byIcon(Icons.more_vert));
|
||||
await _settle(tester);
|
||||
await tester.tap(find.text(_l10n.contact_settings).last);
|
||||
await _settle(tester);
|
||||
expect(find.byType(AlertDialog), findsOneWidget);
|
||||
@@ -431,7 +433,7 @@ void main() {
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
});
|
||||
|
||||
testWidgets('channel chat uses the same selector and saves offline', (
|
||||
testWidgets('channel chat uses the same page and saves offline', (
|
||||
tester,
|
||||
) async {
|
||||
final connector = await _offlineConnector(tester);
|
||||
@@ -442,10 +444,13 @@ void main() {
|
||||
);
|
||||
await _settle(tester);
|
||||
|
||||
expect(find.byType(ChatCompressionSelector), findsOneWidget);
|
||||
await openMenu(tester);
|
||||
expect(find.text(_l10n.chatCompression_label('Off')), findsOneWidget);
|
||||
await tester.tapAt(const Offset(1, 1));
|
||||
await _settle(tester);
|
||||
|
||||
await choose(tester, _l10n.chatCompression_smaz);
|
||||
await openMenu(tester);
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
expect(
|
||||
await tester.runAsync(() => store.loadSmazEnabled(channel.storageId!)),
|
||||
|
||||
@@ -37,6 +37,7 @@ final _l10n = AppLocalizationsEn();
|
||||
|
||||
MeshCoreConnector? _sharedConnector;
|
||||
AppSettingsService? _sharedSettings;
|
||||
final _frameLog = BleDebugLogService();
|
||||
|
||||
Future<MeshCoreConnector> _connectedConnector(WidgetTester tester) async {
|
||||
if (_sharedConnector != null) return _sharedConnector!;
|
||||
@@ -51,6 +52,7 @@ Future<MeshCoreConnector> _connectedConnector(WidgetTester tester) async {
|
||||
pathHistoryService: PathHistoryService(storage),
|
||||
appSettingsService: settings,
|
||||
translationService: translation,
|
||||
bleDebugLogService: _frameLog,
|
||||
);
|
||||
connector.reviewRadioFactoryForTest = () => ReviewRadio(
|
||||
scheduledMessageInterval: const Duration(hours: 1),
|
||||
@@ -338,6 +340,77 @@ void main() {
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
});
|
||||
|
||||
testWidgets('Contact Settings sends the hop limit and reads it back', (
|
||||
tester,
|
||||
) async {
|
||||
final connector = await _connectedConnector(tester);
|
||||
final original = connector.autoAddMaxHops;
|
||||
expect(original, isNotNull, reason: 'review radio reports the hop limit');
|
||||
await tester.pumpWidget(
|
||||
_app(connector, _launcher(const ContactSettingsScreen())),
|
||||
);
|
||||
await _open(tester);
|
||||
String option(int hops) => _l10n.contactsSettings_hopLimitOption(hops);
|
||||
expect(find.text(option(original!)), findsOneWidget);
|
||||
|
||||
Future<void> setHops(int hops) async {
|
||||
final field = find.byType(DropdownButtonFormField<int>);
|
||||
await tester.ensureVisible(field);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(field);
|
||||
await tester.pumpAndSettle();
|
||||
// The open menu builds only the rows around the current value.
|
||||
final item = find.text(option(hops));
|
||||
await tester.scrollUntilVisible(
|
||||
item,
|
||||
hops < connector.autoAddMaxHops! ? -48 : 48,
|
||||
scrollable: find.byType(Scrollable).last,
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(item.last);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(_saveAction);
|
||||
await _waitFor(tester, () => connector.autoAddMaxHops == hops);
|
||||
}
|
||||
|
||||
// The last frame of [code] the app sent to the radio.
|
||||
List<int> lastSent(int code) => _frameLog.entries
|
||||
.lastWhere((e) => e.outgoing && e.payload.first == code)
|
||||
.payload;
|
||||
int sentCount(int code) => _frameLog.entries
|
||||
.where((e) => e.outgoing && e.payload.first == code)
|
||||
.length;
|
||||
|
||||
final fetchesBefore = sentCount(cmdGetAutoAddConfig);
|
||||
await setHops(8);
|
||||
expect(connector.autoAddMaxHops, 8);
|
||||
expect(find.text(option(8)), findsOneWidget);
|
||||
expect(_saveAction, findsNothing);
|
||||
// [CMD_SET_AUTOADD_CONFIG][flags][max hops], then a fetch to read it back.
|
||||
expect(lastSent(cmdSetAutoAddConfig), hasLength(3));
|
||||
expect(lastSent(cmdSetAutoAddConfig).last, 8);
|
||||
expect(sentCount(cmdGetAutoAddConfig), fetchesBefore + 1);
|
||||
|
||||
// Changing only another setting sends the old two-byte frame.
|
||||
final overwrite = find.text(_l10n.contactsSettings_overwriteOldestTitle);
|
||||
for (var i = 0; i < 2; i++) {
|
||||
await tester.ensureVisible(overwrite);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(overwrite);
|
||||
await tester.pump();
|
||||
await tester.tap(_saveAction);
|
||||
await _waitFor(tester, () => _saveAction.evaluate().isEmpty);
|
||||
expect(lastSent(cmdSetAutoAddConfig), hasLength(2));
|
||||
}
|
||||
expect(connector.autoAddMaxHops, 8);
|
||||
|
||||
await setHops(original);
|
||||
expect(connector.autoAddMaxHops, original);
|
||||
expect(lastSent(cmdSetAutoAddConfig), hasLength(3));
|
||||
expect(lastSent(cmdSetAutoAddConfig).last, original);
|
||||
await tester.pumpWidget(const SizedBox());
|
||||
});
|
||||
|
||||
testWidgets('Node Name counts bytes and saves to the radio', (tester) async {
|
||||
final connector = await _connectedConnector(tester);
|
||||
final originalName = connector.selfName!;
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:meshcore_open/l10n/app_localizations.dart';
|
||||
import 'package:meshcore_open/models/app_settings.dart';
|
||||
import 'package:meshcore_open/theme/mesh_theme.dart';
|
||||
import 'package:meshcore_open/widgets/chat_compression_selector.dart';
|
||||
|
||||
final _l10n = lookupAppLocalizations(const Locale('en'));
|
||||
|
||||
final _profiles = [
|
||||
Cyr2LatProfile(id: 'ru', name: 'Russian', charMap: const {'А': 'A'}),
|
||||
Cyr2LatProfile(id: 'sr', name: 'Serbian', charMap: const {'З': '3'}),
|
||||
];
|
||||
|
||||
/// Stands in for a chat screen: keeps the "saved" state and applies a change
|
||||
/// only when the test completes the pending write.
|
||||
class _Host extends StatefulWidget {
|
||||
final ChatCompressionMode initialMode;
|
||||
final bool enabled;
|
||||
final String? initialProfileId;
|
||||
final List<ChatCompressionMode> modeCalls;
|
||||
final List<String> profileCalls;
|
||||
final List<Completer<void>> pending;
|
||||
|
||||
const _Host({
|
||||
this.initialMode = ChatCompressionMode.off,
|
||||
this.enabled = true,
|
||||
this.initialProfileId,
|
||||
required this.modeCalls,
|
||||
required this.profileCalls,
|
||||
required this.pending,
|
||||
});
|
||||
|
||||
@override
|
||||
State<_Host> createState() => _HostState();
|
||||
}
|
||||
|
||||
class _HostState extends State<_Host> {
|
||||
late ChatCompressionMode _mode = widget.initialMode;
|
||||
late String? _profileId = widget.initialProfileId;
|
||||
|
||||
Future<void> _write(void Function() apply) async {
|
||||
final completer = Completer<void>();
|
||||
widget.pending.add(completer);
|
||||
await completer.future;
|
||||
if (mounted) setState(apply);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Chat')),
|
||||
body: Column(
|
||||
children: [
|
||||
ChatCompressionSelector(
|
||||
mode: _mode,
|
||||
enabled: widget.enabled,
|
||||
disabledReason: widget.enabled
|
||||
? null
|
||||
: _l10n.chatCompression_noStorageId,
|
||||
profiles: _profiles,
|
||||
profileId: _profileId,
|
||||
defaultProfileId: 'ru',
|
||||
onModeChanged: (mode) {
|
||||
widget.modeCalls.add(mode);
|
||||
return _write(() => _mode = mode);
|
||||
},
|
||||
onProfileChanged: (id) {
|
||||
widget.profileCalls.add(id);
|
||||
return _write(() => _profileId = id);
|
||||
},
|
||||
),
|
||||
const Expanded(child: Placeholder()),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
late List<ChatCompressionMode> modeCalls;
|
||||
late List<String> profileCalls;
|
||||
late List<Completer<void>> pending;
|
||||
|
||||
setUp(() {
|
||||
modeCalls = [];
|
||||
profileCalls = [];
|
||||
pending = [];
|
||||
});
|
||||
|
||||
Future<void> pumpHost(
|
||||
WidgetTester tester, {
|
||||
ChatCompressionMode mode = ChatCompressionMode.off,
|
||||
bool enabled = true,
|
||||
String? profileId,
|
||||
Size size = const Size(400, 800),
|
||||
double textScale = 1.0,
|
||||
}) async {
|
||||
tester.view.physicalSize = size;
|
||||
tester.view.devicePixelRatio = 1.0;
|
||||
addTearDown(tester.view.reset);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: MeshTheme.light(),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
builder: (context, child) => MediaQuery(
|
||||
data: MediaQuery.of(
|
||||
context,
|
||||
).copyWith(textScaler: TextScaler.linear(textScale)),
|
||||
child: child!,
|
||||
),
|
||||
home: _Host(
|
||||
initialMode: mode,
|
||||
enabled: enabled,
|
||||
initialProfileId: profileId,
|
||||
modeCalls: modeCalls,
|
||||
profileCalls: profileCalls,
|
||||
pending: pending,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> openSheet(WidgetTester tester) async {
|
||||
await tester.tap(find.byType(ChatCompressionSelector));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
Finder optionRow(String label) =>
|
||||
find.ancestor(of: find.text(label), matching: find.byType(ListTile));
|
||||
|
||||
bool isSelected(WidgetTester tester, String label) {
|
||||
final row = optionRow(label);
|
||||
return find
|
||||
.descendant(of: row, matching: find.byIcon(Icons.radio_button_checked))
|
||||
.evaluate()
|
||||
.isNotEmpty;
|
||||
}
|
||||
|
||||
testWidgets('shows the saved mode and announces it', (tester) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
await pumpHost(tester, mode: ChatCompressionMode.smaz);
|
||||
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
expect(
|
||||
tester.getSemantics(
|
||||
find.bySemanticsLabel(_l10n.chatCompression_label('SMAZ')),
|
||||
),
|
||||
isSemantics(
|
||||
label: _l10n.chatCompression_label('SMAZ'),
|
||||
hint: _l10n.chatCompression_changeHint,
|
||||
isButton: true,
|
||||
isEnabled: true,
|
||||
hasTapAction: true,
|
||||
),
|
||||
);
|
||||
expect(
|
||||
tester.getSize(find.byType(ChatCompressionSelector)).height,
|
||||
greaterThanOrEqualTo(48),
|
||||
);
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
testWidgets('one sheet lists the three modes with their explanations', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpHost(tester);
|
||||
await openSheet(tester);
|
||||
|
||||
expect(find.text(_l10n.chatCompression_title), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_off), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_smaz), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_cyr2lat), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_offDescription), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_smazDescription), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_cyr2latDescription), findsOneWidget);
|
||||
expect(isSelected(tester, _l10n.chatCompression_off), isTrue);
|
||||
expect(isSelected(tester, _l10n.chatCompression_smaz), isFalse);
|
||||
// No profile picker unless Cyr2Lat is chosen.
|
||||
expect(find.text(_l10n.chatCompression_profile), findsNothing);
|
||||
expect(find.byType(Dialog), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('a choice shows only after it is saved, then the sheet closes', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpHost(tester);
|
||||
await openSheet(tester);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_smaz));
|
||||
await tester.pump();
|
||||
expect(modeCalls, [ChatCompressionMode.smaz]);
|
||||
// Still saving: old mode shown, options locked against rapid taps.
|
||||
expect(isSelected(tester, _l10n.chatCompression_off), isTrue);
|
||||
expect(
|
||||
tester.widget<ListTile>(optionRow(_l10n.chatCompression_cyr2lat)).enabled,
|
||||
isFalse,
|
||||
);
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
expect(modeCalls, [ChatCompressionMode.smaz]);
|
||||
|
||||
pending.single.complete();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(_l10n.chatCompression_title), findsNothing);
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Cyr2Lat keeps the sheet open with its profile picker', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpHost(tester);
|
||||
await openSheet(tester);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
pending.removeAt(0).complete();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_title), findsOneWidget);
|
||||
expect(isSelected(tester, _l10n.chatCompression_cyr2lat), isTrue);
|
||||
expect(find.text(_l10n.chatCompression_profile), findsOneWidget);
|
||||
// No profile saved for the chat: the app-wide one is what sending uses.
|
||||
expect(find.text('Russian'), findsOneWidget);
|
||||
|
||||
await tester.ensureVisible(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Serbian').last);
|
||||
await tester.pump();
|
||||
expect(profileCalls, ['sr']);
|
||||
pending.removeAt(0).complete();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Serbian'), findsOneWidget);
|
||||
expect(find.text(_l10n.chatCompression_label('Cyr2Lat')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a failed save keeps the saved mode and says so', (tester) async {
|
||||
await pumpHost(tester, mode: ChatCompressionMode.smaz);
|
||||
await openSheet(tester);
|
||||
|
||||
await tester.tap(find.text(_l10n.chatCompression_cyr2lat));
|
||||
await tester.pump();
|
||||
pending.single.completeError(StateError('disk full'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_saveFailed), findsOneWidget);
|
||||
expect(isSelected(tester, _l10n.chatCompression_smaz), isTrue);
|
||||
expect(isSelected(tester, _l10n.chatCompression_cyr2lat), isFalse);
|
||||
expect(
|
||||
tester.widget<ListTile>(optionRow(_l10n.chatCompression_off)).enabled,
|
||||
isTrue,
|
||||
);
|
||||
await tester.tap(find.byTooltip('Close'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text(_l10n.chatCompression_label('SMAZ')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('a failed profile save shows the saved profile again', (
|
||||
tester,
|
||||
) async {
|
||||
await pumpHost(tester, mode: ChatCompressionMode.cyr2lat, profileId: 'ru');
|
||||
await openSheet(tester);
|
||||
|
||||
await tester.ensureVisible(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Russian'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Serbian').last);
|
||||
await tester.pump();
|
||||
expect(profileCalls, ['sr']);
|
||||
pending.single.completeError(StateError('disk full'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text(_l10n.chatCompression_saveFailed), findsOneWidget);
|
||||
expect(find.text('Russian'), findsOneWidget);
|
||||
expect(find.text('Serbian'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('disabled shows the saved mode, and the sheet says why and '
|
||||
'allows no change', (tester) async {
|
||||
final semantics = tester.ensureSemantics();
|
||||
await pumpHost(tester, mode: ChatCompressionMode.smaz, enabled: false);
|
||||
|
||||
final label = _l10n.chatCompression_label('SMAZ');
|
||||
expect(find.text(label), findsOneWidget);
|
||||
expect(find.byIcon(Icons.lock_outline), findsOneWidget);
|
||||
expect(
|
||||
find.bySemanticsLabel('$label. ${_l10n.chatCompression_noStorageId}'),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await openSheet(tester);
|
||||
expect(find.text(_l10n.chatCompression_noStorageId), findsOneWidget);
|
||||
expect(isSelected(tester, _l10n.chatCompression_smaz), isTrue);
|
||||
for (final mode in [
|
||||
_l10n.chatCompression_off,
|
||||
_l10n.chatCompression_smaz,
|
||||
_l10n.chatCompression_cyr2lat,
|
||||
]) {
|
||||
expect(tester.widget<ListTile>(optionRow(mode)).enabled, isFalse);
|
||||
}
|
||||
await tester.tap(find.text(_l10n.chatCompression_off), warnIfMissed: false);
|
||||
await tester.pumpAndSettle();
|
||||
expect(modeCalls, isEmpty);
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
for (final scale in [1.3, 2.0]) {
|
||||
testWidgets('fits a 320dp phone at ${scale}x text', (tester) async {
|
||||
await pumpHost(
|
||||
tester,
|
||||
mode: ChatCompressionMode.cyr2lat,
|
||||
enabled: true,
|
||||
size: const Size(320, 568),
|
||||
textScale: scale,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
await openSheet(tester);
|
||||
expect(tester.takeException(), isNull);
|
||||
// The sheet scrolls to its last option and the profile picker.
|
||||
await tester.scrollUntilVisible(
|
||||
find.text(_l10n.chatCompression_profile),
|
||||
200,
|
||||
scrollable: find.byType(Scrollable).last,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
}
|
||||
+172
-1
@@ -1 +1,172 @@
|
||||
{}
|
||||
{
|
||||
"bg": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"cs": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"de": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"es": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"fr": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"hu": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"it": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"ja": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"ko": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"nl": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"pl": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"pt": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"pt_PT": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"ru": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"sk": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"sl": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"sv": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"uk": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
],
|
||||
|
||||
"zh": [
|
||||
"bookmarks_removeConfirmTitle",
|
||||
"bookmarks_removeConfirmMessage",
|
||||
"bookmarks_removeSelectedConfirmTitle",
|
||||
"bookmarks_removeSelectedConfirmMessage",
|
||||
"chat_resendSelectedTitle",
|
||||
"chat_resendSelectedConfirm"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user