mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
use isDM from the SDK to determine if a spaceRoom, a joinedRoom or a notificationItem are from a dm room.
This commit is contained in:
@@ -49,6 +49,10 @@ struct RoomInfoProxy: RoomInfoProxyProtocol {
|
||||
var isDirect: Bool {
|
||||
roomInfo.isDirect
|
||||
}
|
||||
|
||||
var isDM: Bool {
|
||||
roomInfo.isDm
|
||||
}
|
||||
|
||||
var isSpace: Bool {
|
||||
roomInfo.isSpace
|
||||
|
||||
@@ -36,6 +36,7 @@ protocol RoomInfoProxyProtocol: BaseRoomInfoProxyProtocol {
|
||||
|
||||
var isEncrypted: Bool { get }
|
||||
var isDirect: Bool { get }
|
||||
var isDM: Bool { get }
|
||||
var isSpace: Bool { get }
|
||||
var isFavourite: Bool { get }
|
||||
|
||||
|
||||
@@ -51,4 +51,8 @@ final class RoomMemberProxy: RoomMemberProxyProtocol {
|
||||
var powerLevel: RoomPowerLevel {
|
||||
.init(rustPowerLevel: member.powerLevel)
|
||||
}
|
||||
|
||||
var isServiceMember: Bool {
|
||||
member.isServiceMember
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ protocol RoomMemberProxyProtocol: AnyObject {
|
||||
var isIgnored: Bool { get }
|
||||
|
||||
var powerLevel: RoomPowerLevel { get }
|
||||
|
||||
var isServiceMember: Bool { get }
|
||||
}
|
||||
|
||||
extension RoomMemberProxyProtocol {
|
||||
|
||||
@@ -222,10 +222,6 @@ extension JoinedRoomProxyProtocol {
|
||||
isDirect: infoPublisher.value.isDirect,
|
||||
historySharingState: historySharingState)
|
||||
}
|
||||
|
||||
var isDirectOneToOneRoom: Bool {
|
||||
infoPublisher.value.isDirect && infoPublisher.value.activeMembersCount <= 2
|
||||
}
|
||||
|
||||
func members() async -> [RoomMemberProxyProtocol]? {
|
||||
await updateMembers()
|
||||
|
||||
Reference in New Issue
Block a user