Repository navigation
feat(chats): show pending join requests on a hosted group's row - #1864
Merged
Merged
Conversation
A private group you host now shows who waits to join on its own Chats row, the way unread messages show (node 12824:117). The pill counts requests plus unread messages, the timestamp turns blue, and the subtitle reads "Jasper wants to join" or "3 people want to join" in the unread colour. With unread messages too, " · " and the last message follow in grey, cut off at the end. Someone typing keeps the slot until they stop. The row sorts by the later of its last activity and its newest request, so ChatListEntry gains pendingRequests and newestRequestMs and the projection sorts by both. ChatsViewModel now draws rows in the projection's order; until now feed order and projection order were the same, so nothing read projection.main for ordering. Requests count as unread for the Unread chip, the Archived row and the tab badge. The badge has its own source, so observeUnreadChatListCount takes the lobbies, and RealSessionController fetches each hosted group's lobby as it appears; otherwise the badge would miss requests until Chats was first opened. The Archived list reads the same lobbies. State.needsDecision had no reader and goes. hostedPrivateGroups moves to shared/chat for the session to use.
LobbyUpdate only arrives on the event stream, and the server doesn't replay what was sent while the stream was down. A request that came or went in that gap left the lobby, and now the Chats row's count, wrong until something loaded it again. iOS reloads on reconnect (ConversationController.swift:606); Android didn't. LobbyUpdateSink gains reload(), and HostLobbies refetches every lobby it holds. RealChatCoordinator calls it with the feed sync wherever the stream comes back: the network reconnect, the heartbeat finding the stream down, and returning to the foreground.
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.
A private group you host now shows its pending join requests on its Chats row, as unread messages do. This implements the design note in code-payments/flipcash-client-orchestrator#69 (frames from node 12824:117).
entered_at. The timestamp shows that same time.ChatsViewModelnow draws rows in the projection's order. Before this, the feed order and the projection order always matched, so nothing reordered rows.observeUnreadChatListCount), so it now takes the lobbies.RealSessionControllerloads each hosted group's lobby, so the badge doesn't depend on Chats having been opened.State.needsDecisionhad no reader, so it's removed.The second commit reloads hosted lobbies when the event stream reconnects (on a network reconnect, when the heartbeat finds the stream down, and on return to the foreground), matching iOS's
ConversationController.swift:606.LobbyUpdateisn't replayed after a gap, so without the reload a missed update leaves the row's count wrong.Where the app's tokens differ from the Figma values, the app's tokens are used:
textMedium/textSmalland its font.#0A84FFmaps toCodeTheme.colors.indicator, the colour the unread timestamp already uses.