v0.2.0: bubble for Android 0.2.0 — chat search, swipe for unread, faster chat opening
Desktop: - Search lists chats whose own name matches first, so a named group isn't pushed out of the top 8 by chats that merely include a member. Android (Rabbit R1) app, 0.2.0: - Pull the chat list past its top for a search box (name, person, number, then group members; archived chats too; Back clears it). - Swipe right to left marks a chat unread / read over a magenta band; left to right still archives (SwipeActions replaces SwipeArchive). - Google Voice chats don't offer voice notes in the paperclip bubble. - Chats open with their newest 60 messages, then the full history; marking read (and the Google Voice network call) waits until they're on screen. Cached pictures show at once, and one slow download no longer blocks the other images. Fixed a contacts reload race. - Sandbox data gains filler chats, a named group and a 4,000-message chat. Also: the Android app, Google Voice support, media, export, emoji and the other work since the first commit, and a CLAUDE.md carrying the privacy rule.
This commit is contained in:
+70
-1
@@ -2,6 +2,37 @@
|
||||
|
||||
export type Direction = 'in' | 'out'
|
||||
export type MessageStatus = 'delivered' | 'pending' | 'failed'
|
||||
export type MessageKind = 'sms' | 'mms'
|
||||
export type Theme = 'system' | 'light' | 'dark'
|
||||
|
||||
// One MMS attachment. `url` is where voip.ms serves it; `file` is our cached
|
||||
// copy (a name inside <dataDir>/media), filled in once downloaded or sent.
|
||||
export interface MediaRef {
|
||||
url?: string
|
||||
file?: string
|
||||
mime?: string
|
||||
width?: number
|
||||
height?: number
|
||||
}
|
||||
|
||||
// "Export chat": which days, which format, and the names shown in the chat.
|
||||
export interface ChatExport {
|
||||
from?: string // YYYY-MM-DD, inclusive; neither = all time
|
||||
to?: string
|
||||
format: 'pdf' | 'txt'
|
||||
attachments: boolean // PDF only: show photos (otherwise "[Photo]")
|
||||
title: string // the chat's name as shown
|
||||
names: Record<string, string> // group senders' names, by number
|
||||
}
|
||||
|
||||
// An attachment on its way out (already compressed by the renderer).
|
||||
export interface OutgoingAttachment {
|
||||
name: string
|
||||
mime: string
|
||||
data: Uint8Array
|
||||
width?: number
|
||||
height?: number
|
||||
}
|
||||
|
||||
export interface Message {
|
||||
id: number
|
||||
@@ -10,8 +41,11 @@ export interface Message {
|
||||
direction: Direction
|
||||
body: string
|
||||
ts: number // epoch ms, UTC
|
||||
kind: 'sms' | 'mms'
|
||||
kind: MessageKind
|
||||
status: MessageStatus
|
||||
media?: MediaRef[]
|
||||
error?: string // why a send failed
|
||||
sender?: string // who sent an incoming group message (normalized number)
|
||||
}
|
||||
|
||||
export interface Conversation {
|
||||
@@ -20,7 +54,13 @@ export interface Conversation {
|
||||
lastBody: string
|
||||
lastTs: number
|
||||
lastDirection: Direction
|
||||
lastKind: MessageKind
|
||||
lastMedia?: MediaRef // first attachment of the last message, if any
|
||||
lastSender?: string // sender of the last message, in group chats
|
||||
name?: string // a name you gave the conversation (local only)
|
||||
unread: number
|
||||
markedUnread: boolean // manually marked unread (shown as a dot)
|
||||
archived: boolean
|
||||
}
|
||||
|
||||
export interface ContactInfo {
|
||||
@@ -31,6 +71,20 @@ export interface ContactInfo {
|
||||
book: string
|
||||
}
|
||||
|
||||
export interface AddressBook {
|
||||
uid: string
|
||||
name: string
|
||||
account: string // e.g. the Nextcloud account it belongs to
|
||||
}
|
||||
|
||||
export interface NewContact {
|
||||
first: string
|
||||
last: string
|
||||
org: string
|
||||
number: string // E.164
|
||||
book?: string // address book uid; default: GNOME Contacts' own default
|
||||
}
|
||||
|
||||
export interface SearchHit {
|
||||
id: number
|
||||
did: string
|
||||
@@ -40,10 +94,13 @@ export interface SearchHit {
|
||||
snippet: string // contains / markers around matched text
|
||||
}
|
||||
|
||||
export type Provider = 'voipms' | 'gvoice'
|
||||
|
||||
export interface Did {
|
||||
did: string
|
||||
description: string
|
||||
smsEnabled: boolean
|
||||
provider?: Provider // absent = voip.ms
|
||||
}
|
||||
|
||||
export interface SyncStatus {
|
||||
@@ -53,6 +110,15 @@ export interface SyncStatus {
|
||||
lastPoll?: number
|
||||
error?: string
|
||||
total: number
|
||||
gvoice?: GvStatus
|
||||
}
|
||||
|
||||
// Google Voice syncs on its own, so it reports separately.
|
||||
export interface GvStatus {
|
||||
phase: 'idle' | 'backfill' | 'polling' | 'error' | 'signedOut'
|
||||
backfillDone: boolean
|
||||
lastPoll?: number
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
@@ -60,6 +126,9 @@ export interface Settings {
|
||||
dids: string[] // DIDs to sync; empty = all SMS-enabled
|
||||
defaultDid?: string
|
||||
backfillFloor: string // YYYY-MM-DD, stop backfill here
|
||||
theme: Theme
|
||||
notifications: boolean // new messages go to the notification list
|
||||
contactBook?: string // where "Add to contacts" puts them; default: GNOME Contacts' default
|
||||
}
|
||||
|
||||
export interface Credentials {
|
||||
|
||||
Reference in New Issue
Block a user