mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Hide the unread dot after previewing an invite. (#3800)
* Hide the unread dot when previewing an invite. * Remove an invited room ID when accepting/rejecting. * Remove the unread badge from knocked room cells. * Update snapshots. * Address PR comments. Refactor KnockRequestType to JoinRequestType.
This commit is contained in:
@@ -122,10 +122,13 @@ struct HomeScreenInviteCell: View {
|
||||
room.isDirect ? room.inviter?.id : room.canonicalAlias
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var badge: some View {
|
||||
Circle()
|
||||
.scaledFrame(size: 12)
|
||||
.foregroundColor(.compound.iconAccentTertiary)
|
||||
if room.badges.isDotShown {
|
||||
Circle()
|
||||
.scaledFrame(size: 12)
|
||||
.foregroundColor(.compound.iconAccentTertiary) // The badge is always green, no need to check isHighlighted here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +181,7 @@ private extension HomeScreenRoom {
|
||||
|
||||
let summary = RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "@someone:somewhere.com",
|
||||
knockRequestType: .invite(inviter: inviter),
|
||||
joinRequestType: .invite(inviter: inviter),
|
||||
name: "Some Guy",
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
@@ -205,7 +208,7 @@ private extension HomeScreenRoom {
|
||||
|
||||
let summary = RoomSummary(roomListItem: RoomListItemSDKMock(),
|
||||
id: "@someone:somewhere.com",
|
||||
knockRequestType: .invite(inviter: inviter),
|
||||
joinRequestType: .invite(inviter: inviter),
|
||||
name: "Awesome Room",
|
||||
isDirect: false,
|
||||
avatarURL: avatarURL,
|
||||
|
||||
Reference in New Issue
Block a user