v0.8.8: bubble for Android 0.7.5 — the composer is always the small size; smoother scrolling past photos

Android: the composer used to shrink only with the keyboard up; now it is always that size (small text, tight padding, 60 dp buttons), and the keyboard only takes a line off the text box and the subtitle. Checked on the Rabbit with the dev app, at rest and typing.

Desktop: the chat and Get info show a smaller copy of each still picture (720 px long edge, made once into <dataDir>/thumbs) instead of decoding a phone's 4000 px photo every time a row scrolls in. Full size, Save and Copy still use the original; GIFs and pictures already that small are served as they are. Pictures decode off the main thread.
This commit is contained in:
2026-11-13 12:01:56 -08:00
parent a3017bdd50
commit dd994c5bc3
9 changed files with 62 additions and 25 deletions
+8 -4
View File
@@ -239,13 +239,17 @@ async function servePhoto(req: Request): Promise<Response> {
}
}
// ---- MMS attachments: mms-media://m/<messageId>/<index> ----
// ---- MMS attachments: mms-media://m/<messageId>/<index>[?thumb] ----
// ?thumb: a smaller copy of a still picture, for the chat and Get info.
async function serveMedia(req: Request): Promise<Response> {
const [id, index] = new URL(req.url).pathname.slice(1).split('/').map(Number)
const url = new URL(req.url)
const [id, index] = url.pathname.slice(1).split('/').map(Number)
const ref = await media.resolve(id, index)
if (!ref?.file) return new Response(null, { status: 404 })
const headers = { 'content-type': ref.mime ?? guessMime(ref.file) ?? 'application/octet-stream' }
return new Response(fs.readFileSync(media.filePath(ref.file)), { headers })
const thumb = url.searchParams.has('thumb') ? await media.thumb(ref).catch(() => undefined) : undefined
const file = thumb ?? media.filePath(ref.file)
const mime = thumb ? (thumb.endsWith('.png') ? 'image/png' : 'image/jpeg') : (ref.mime ?? guessMime(ref.file) ?? 'application/octet-stream')
return new Response(await fs.promises.readFile(file), { headers: { 'content-type': mime } })
}
async function saveMediaAs(id: number, index: number): Promise<void> {