feat(messages): unread badges + OS notification for private messages
Private messages (NIP-17) arrived in the foreground with no signal: no unread count, no badge, no OS notification. Hook both into the single InboxService.ingest choke point. - UnreadService: per-peer "last read" in the keystore (timestamps+pubkey only, no message text), live count via a changes stream, active-peer suppression so the open chat never badges or notifies. - UnreadBadge: reusable, RTL-aware (Flutter Badge) — on the home hamburger, the drawer "Chat" item, and per-conversation in the messages list. - Mark-read on chat open (ChatScreen). - NotificationService over flutter_local_notifications: generic "New message from <name>" (no message text, for privacy), payload = pubkey, tap opens /chat/:pubkey. No-op on web/Windows; Android POST_NOTIFICATIONS. - i18n notifications.newMessageFrom (en/es/pt/ast). Background/push stays out of scope (foreground-only by design). Tests: UnreadService, NotificationService (mock plugin), InboxService hooks (new peer notifies/counts; duplicate, own, and open-chat do not), and a UnreadBadge widget test. dart analyze clean; commons_core green.
This commit is contained in:
parent
4d110e8082
commit
d026376993
27 changed files with 1238 additions and 114 deletions
|
|
@ -214,8 +214,18 @@
|
|||
"anyMonth": "Cualquier mes",
|
||||
"noDate": "Indicar fecha de cosecha",
|
||||
"monthNames": [
|
||||
"enero", "febrero", "marzo", "abril", "mayo", "junio",
|
||||
"julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"
|
||||
"enero",
|
||||
"febrero",
|
||||
"marzo",
|
||||
"abril",
|
||||
"mayo",
|
||||
"junio",
|
||||
"julio",
|
||||
"agosto",
|
||||
"septiembre",
|
||||
"octubre",
|
||||
"noviembre",
|
||||
"diciembre"
|
||||
]
|
||||
},
|
||||
"lotType": {
|
||||
|
|
@ -330,30 +340,102 @@
|
|||
"some": "algunas",
|
||||
"plenty": "muchas",
|
||||
"pinch": "una pizca",
|
||||
"handful": { "singular": "puñado", "plural": "puñados" },
|
||||
"teaspoon": { "singular": "cucharadita", "plural": "cucharaditas" },
|
||||
"spoon": { "singular": "cuchara", "plural": "cucharas" },
|
||||
"cup": { "singular": "taza", "plural": "tazas" },
|
||||
"jar": { "singular": "bote", "plural": "botes" },
|
||||
"sack": { "singular": "saco", "plural": "sacos" },
|
||||
"packet": { "singular": "sobre", "plural": "sobres" },
|
||||
"cob": { "singular": "mazorca", "plural": "mazorcas" },
|
||||
"pod": { "singular": "vaina", "plural": "vainas" },
|
||||
"ear": { "singular": "espiga", "plural": "espigas" },
|
||||
"head": { "singular": "cabezuela", "plural": "cabezuelas" },
|
||||
"fruit": { "singular": "fruto", "plural": "frutos" },
|
||||
"bulb": { "singular": "bulbo", "plural": "bulbos" },
|
||||
"tuber": { "singular": "tubérculo", "plural": "tubérculos" },
|
||||
"seedHead": { "singular": "cabeza de semillas", "plural": "cabezas de semillas" },
|
||||
"bunch": { "singular": "manojo", "plural": "manojos" },
|
||||
"plant": { "singular": "planta", "plural": "plantas" },
|
||||
"pot": { "singular": "maceta", "plural": "macetas" },
|
||||
"tray": { "singular": "bandeja", "plural": "bandejas" },
|
||||
"seedling": { "singular": "plántula", "plural": "plántulas" },
|
||||
"tree": { "singular": "árbol", "plural": "árboles" },
|
||||
"cutting": { "singular": "esqueje", "plural": "esquejes" },
|
||||
"grams": { "singular": "gramo", "plural": "gramos" },
|
||||
"count": { "singular": "semilla", "plural": "semillas" }
|
||||
"handful": {
|
||||
"singular": "puñado",
|
||||
"plural": "puñados"
|
||||
},
|
||||
"teaspoon": {
|
||||
"singular": "cucharadita",
|
||||
"plural": "cucharaditas"
|
||||
},
|
||||
"spoon": {
|
||||
"singular": "cuchara",
|
||||
"plural": "cucharas"
|
||||
},
|
||||
"cup": {
|
||||
"singular": "taza",
|
||||
"plural": "tazas"
|
||||
},
|
||||
"jar": {
|
||||
"singular": "bote",
|
||||
"plural": "botes"
|
||||
},
|
||||
"sack": {
|
||||
"singular": "saco",
|
||||
"plural": "sacos"
|
||||
},
|
||||
"packet": {
|
||||
"singular": "sobre",
|
||||
"plural": "sobres"
|
||||
},
|
||||
"cob": {
|
||||
"singular": "mazorca",
|
||||
"plural": "mazorcas"
|
||||
},
|
||||
"pod": {
|
||||
"singular": "vaina",
|
||||
"plural": "vainas"
|
||||
},
|
||||
"ear": {
|
||||
"singular": "espiga",
|
||||
"plural": "espigas"
|
||||
},
|
||||
"head": {
|
||||
"singular": "cabezuela",
|
||||
"plural": "cabezuelas"
|
||||
},
|
||||
"fruit": {
|
||||
"singular": "fruto",
|
||||
"plural": "frutos"
|
||||
},
|
||||
"bulb": {
|
||||
"singular": "bulbo",
|
||||
"plural": "bulbos"
|
||||
},
|
||||
"tuber": {
|
||||
"singular": "tubérculo",
|
||||
"plural": "tubérculos"
|
||||
},
|
||||
"seedHead": {
|
||||
"singular": "cabeza de semillas",
|
||||
"plural": "cabezas de semillas"
|
||||
},
|
||||
"bunch": {
|
||||
"singular": "manojo",
|
||||
"plural": "manojos"
|
||||
},
|
||||
"plant": {
|
||||
"singular": "planta",
|
||||
"plural": "plantas"
|
||||
},
|
||||
"pot": {
|
||||
"singular": "maceta",
|
||||
"plural": "macetas"
|
||||
},
|
||||
"tray": {
|
||||
"singular": "bandeja",
|
||||
"plural": "bandejas"
|
||||
},
|
||||
"seedling": {
|
||||
"singular": "plántula",
|
||||
"plural": "plántulas"
|
||||
},
|
||||
"tree": {
|
||||
"singular": "árbol",
|
||||
"plural": "árboles"
|
||||
},
|
||||
"cutting": {
|
||||
"singular": "esqueje",
|
||||
"plural": "esquejes"
|
||||
},
|
||||
"grams": {
|
||||
"singular": "gramo",
|
||||
"plural": "gramos"
|
||||
},
|
||||
"count": {
|
||||
"singular": "semilla",
|
||||
"plural": "semillas"
|
||||
}
|
||||
},
|
||||
"market": {
|
||||
"title": "Semillas cerca de ti",
|
||||
|
|
@ -438,5 +520,8 @@
|
|||
"vouch": "Conozco a esta persona",
|
||||
"vouched": "Avalas a esta persona",
|
||||
"circle": "En tu círculo"
|
||||
},
|
||||
"notifications": {
|
||||
"newMessageFrom": "Nuevo mensaje de {name}"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue