feat(chatlist): add mark-as-read to the multi-select toolbar - #70
Merged
trevarj merged 2 commits intoAug 26, 2026
Merged
Conversation
Mark-all deliberately skips muted rows, so a muted chat's unread count can only ever clear by opening it individually. Add an explicit per-selection "mark as read" action to the selection toolbar (Icons.Outlined.DoneAll, matching the existing drawer mark-all-read icon) that reaches every selected buffer, muted or not — hand-picking a row is an explicit opt-in, unlike the automatic mark-all sweep. ChatListViewModel.markSelectedRead delegates to the same markChatsRead entry point mark-all uses, just without the mute filter.
"N selected" wrapped onto 3 lines once the toolbar carried 5 action icons (pin/mute/mark-read/archive/delete), blowing out the bar's height. Two changes, discussed with trev/PeGaSuS in #motd: - The title now auto-shrinks its font (TextAutoSize.StepBased, 14-22sp) before ever wrapping, with maxLines=1 + ellipsis as the last-resort floor for pathological cases (huge selected counts on tiny screens). - Collapse the action row to the 3 most-reached-for actions inline (mark as read, mute, delete/remove) plus an overflow "more" menu (Icons.Filled.MoreVert) holding pin and archive/unarchive. Existing testTags (chatlist_selection_pin/mute/archive) now live on DropdownMenuItems instead of top-level IconButtons.
trevarj
approved these changes
Aug 26, 2026
trevarj
left a comment
Owner
There was a problem hiding this comment.
Selection action uses existing markChatsRead boundary, explicitly includes muted rows, clears transient selection, and has focused coverage. Exact head passed complete Required CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
unreadChatRows/mark-all deliberately skips muted rows (comment: "the whole point of muting is not to be told about activity ahead of time"), which means a muted chat's unread badge can only ever clear by opening it individually — it can grow indefinitely if you mute-and-forget.Icons.Outlined.DoneAll— the same icon the drawer's existing "mark all read" action already uses, for visual consistency.ChatListViewModel.markSelectedRead(bufferIds)delegates to the samemarkChatsReadentry pointmarkCurrentScopeReaduses, just without theunreadBufferIdsmute filter.Test plan
./gradlew ktlintCheck./gradlew :app:testDebugUnitTest --tests io.github.trevarj.motd.ui.chatlist.ChatListMarkSelectedReadTest(new: asserts a muted row — whichunreadBufferIdsitself skips — still gets marked read via the explicit selection path, plus a no-op-on-empty-selection case)./gradlew assembleDebug