You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48e4733
Browse filesBrowse the repository at this point in the historyBrowse files
fix(chat): render the gate for a group this device has never synced (#1498)
* fix(chat): render the gate for a group this device has never synced
An invite link or a push tap can name a group no sync has brought down, and
nothing fetched it: the group feed, a join and the roster stream all carry only
chats the viewer is already in, so `observeMetadata` emitted null and the screen
had no title, no info card and no gate — with no later read that would supply
them. Our own testing missed it because the group was always already cached,
from having created it or left it.
`hydrateChat` fetches that chat by id, and only that chat: a stored row returns
null so the Room observation stays the only source and a synced chat costs no
round trip.
`GetChat` does not say whether the caller is in the chat, so membership comes
back unknown rather than guessed, and nothing is written to the row — a stored
guess would either open a group the viewer has not joined or gate a member whose
feed has not landed yet. Membership is `Boolean?` from the delegate through to
the screen's subject.
Unknown withholds what the viewer sees: the blur, the gate, and the invite link,
since handing out an invite is an action rather than a view. It does not withhold
what the gate's button offers — access still resolves with `isMember == true`, so
an unknown viewer gets Join or Buy More off their own balance. The transcript is
fetched only for a viewer the gate lets through, so a withheld group never pulls
the messages the blur is over; a member on a fresh install gets theirs when the
feed sync lands, which already loads a group whose applied cursor is still zero.
* fix(chat): use the people glyph on the group profile's invite row
`ic_at` belongs to the row inside the sheet this opens, where it stands for the
username an invite link is sent to (node 10127:118328). On the row that opens the
sheet it said the wrong thing: what the row does is add people to the group,
which is what New Chat's group row already uses `ic_group_3` for.
Copy file name to clipboardExpand all lines: apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/profile/GroupProfileMenuItems.kt
Copy file name to clipboardExpand all lines: apps/flipcash/features/messenger/src/test/kotlin/com/flipcash/app/messenger/internal/ChatViewModelStateTest.kt
Copy file name to clipboardExpand all lines: apps/flipcash/shared/chat/src/main/kotlin/com/flipcash/shared/chat/internal/delegates/MessagingDelegate.kt
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,15 @@ class MessagingDelegate @Inject constructor(
Copy file name to clipboardExpand all lines: apps/flipcash/shared/persistence/sources/src/main/kotlin/com/flipcash/app/persistence/sources/mapper/chat/ChatEntityMapper.kt
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,9 @@ class ChatEntityMapper @Inject constructor() {
67
67
*
68
68
* [isMember] is not on [ChatMetadata]: every payload that carries a group today is one
69
69
* the caller is in, so it is a property of the write, not of the metadata. The feed and
70
-
* a join write `true`; a gated preview fetched by chat id writes `false`.
70
+
* a join write `true`, which is why that is the default. A chat fetched by id for a gated
71
+
* preview is not written at all — `GetChat` cannot say whether the viewer is in it, and the
0 commit comments