cheogram-aapl

created pr with cheogram-aapl/jump-to-unread.1 on 2026-11-16T21:16:13Z · by d7025af3
commented on 2026-11-18T16:35:57Z · by 3c31bc8c
lgtm
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-aapl:jump-to-unread | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-aapl:jump-to-unread [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-aapl:jump-to-unread
add comment to patch request:
ssh pr.pico.sh comment cheogram-aapl:jump-to-unread "lgtm!"
+11 -0 App/App.swift #
......@@ -510,11 +510,22 @@ class ChatViewModel {
510510 }
511511
512512 func loadMessagesAfter(message: Message?) async {
513+ // XYZZY temporary: a newer-page fetch that adds nothing leaves the list's
514+ // spinner to be cleared by an update that never comes.
515+ let log = Logger(subsystem: bundleID, category: "client")
513516 guard let chat, let message, let after = messageData[message.id] else {
517+ log.info("XYZZY newer skipped id=\(message?.id ?? "nil", privacy: .public)")
514518 return
515519 }
520+ let before = messages.count
516521 let fetched = await chat.getMessagesAfter(after: after)
517522 await insertPage(fetched, older: false, of: chat)
523+ let isLast = chat.lastMessage?.canReplace(other: after) ?? false
524+ let added = self.messages.count - before
525+ let caughtUp = self.isCaughtUpToNewest
526+ log.info(
527+ "XYZZY newer after=\(after.serverId ?? after.localId ?? "none", privacy: .public) isLast=\(isLast, privacy: .public) fetched=\(fetched.count, privacy: .public) added=\(added, privacy: .public) caughtUp=\(caughtUp, privacy: .public)"
528+ )
518529 }
519530
520531 private func insertPage(
Back to top