mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 20:38:41 +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:
@@ -9,23 +9,21 @@ import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
struct RoomSummary {
|
||||
enum KnockRequestType {
|
||||
enum JoinRequestType {
|
||||
case invite(inviter: RoomMemberProxyProtocol?)
|
||||
case knock
|
||||
|
||||
var isInvite: Bool {
|
||||
if case .invite = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
switch self {
|
||||
case .invite: true
|
||||
default: false
|
||||
}
|
||||
}
|
||||
|
||||
var isKnock: Bool {
|
||||
if case .knock = self {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
switch self {
|
||||
case .knock: true
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +32,7 @@ struct RoomSummary {
|
||||
|
||||
let id: String
|
||||
|
||||
let knockRequestType: KnockRequestType?
|
||||
let joinRequestType: JoinRequestType?
|
||||
|
||||
let name: String
|
||||
let isDirect: Bool
|
||||
@@ -103,7 +101,7 @@ extension RoomSummary {
|
||||
canonicalAlias = nil
|
||||
hasOngoingCall = false
|
||||
|
||||
knockRequestType = nil
|
||||
joinRequestType = nil
|
||||
isMarkedUnread = false
|
||||
isFavourite = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user