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 f8d2cbd
Browse filesBrowse the repository at this point in the historyBrowse files
fix(messenger): head a solo group with its invite card, messages or not
The invite card only replaced the group's info card while the transcript
was empty, so a group whose only member had posted anything fell back to
the old header. iOS decides on who is in the chat instead: the card heads
the transcript while the viewer is a member and nobody else has joined
(ConversationScreen.showsGroupInvite).
State.showsGroupInviteCard now carries that rule and MessageList reads
it. Once someone joins, the header goes back to the info card and the
invite stays on the group's profile.
Copy file name to clipboardExpand all lines: apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/screens/components/MessageList.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -421,13 +421,13 @@ internal fun MessageList(
421
421
}
422
422
}
423
423
424
-
// Chat start shows contact info container. An empty group the viewer can invite to
425
-
//shows its invite card there instead (node 10330:19164): inviting someone is the
426
-
//only thing to do with an empty group, and it is the same card a DM transcript
424
+
// Chat start shows contact info container. A group nobody else has joined shows its
425
+
// invite card there instead (node 10330:19164), whether or not it has messages:
426
+
//inviting someone is the thing left to do, and it is the same card a DM transcript
427
427
// renders for the link, with a different CTA and destination.
428
428
val inviteUrl = state.groupInviteUrl
429
429
val inviteGroup = state.subject as?ChatSubject.Group
430
-
if (messages.itemCount ==0&& inviteUrl !=null&& inviteGroup !=null) {
430
+
if (state.showsGroupInviteCard&& inviteUrl !=null&& inviteGroup !=null) {
431
431
item(key ="group-invite-card") {
432
432
val card = remember(inviteGroup, inviteUrl, state.ruleCurrency) {
Copy file name to clipboardExpand all lines: apps/flipcash/features/messenger/src/test/kotlin/com/flipcash/app/messenger/internal/ChatViewModelStateTest.kt
+18-2Lines changed: 18 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -43,11 +43,15 @@ class ChatViewModelStateTest {
0 commit comments