mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
element-hq/element-x-ios/issues/2670 - Show invites as part of the room list
This commit is contained in:
committed by
Stefan Ceriu
parent
d34ec30ca6
commit
064626fbbe
@@ -19,6 +19,10 @@ import MatrixRustSDK
|
||||
|
||||
struct RoomSummaryDetails {
|
||||
let id: String
|
||||
|
||||
let isInvite: Bool
|
||||
let inviter: RoomMemberProxyProtocol?
|
||||
|
||||
let name: String
|
||||
let isDirect: Bool
|
||||
let avatarURL: URL?
|
||||
@@ -29,7 +33,7 @@ struct RoomSummaryDetails {
|
||||
let unreadNotificationsCount: UInt
|
||||
let notificationMode: RoomNotificationModeProxy?
|
||||
let canonicalAlias: String?
|
||||
let inviter: RoomMemberProxyProtocol?
|
||||
|
||||
let hasOngoingCall: Bool
|
||||
|
||||
let isMarkedUnread: Bool
|
||||
@@ -70,6 +74,7 @@ extension RoomSummaryDetails {
|
||||
inviter = nil
|
||||
hasOngoingCall = false
|
||||
|
||||
isInvite = false
|
||||
isMarkedUnread = false
|
||||
isFavourite = false
|
||||
}
|
||||
|
||||
@@ -240,6 +240,8 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
let notificationMode = roomInfo.userDefinedNotificationMode.flatMap { RoomNotificationModeProxy.from(roomNotificationMode: $0) }
|
||||
|
||||
let details = RoomSummaryDetails(id: roomInfo.id,
|
||||
isInvite: roomInfo.membership == .invited,
|
||||
inviter: inviterProxy,
|
||||
name: roomInfo.name ?? roomInfo.id,
|
||||
isDirect: roomInfo.isDirect,
|
||||
avatarURL: roomInfo.avatarUrl.flatMap(URL.init(string:)),
|
||||
@@ -250,7 +252,6 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
unreadNotificationsCount: UInt(roomInfo.numUnreadNotifications),
|
||||
notificationMode: notificationMode,
|
||||
canonicalAlias: roomInfo.canonicalAlias,
|
||||
inviter: inviterProxy,
|
||||
hasOngoingCall: roomInfo.hasRoomCall,
|
||||
isMarkedUnread: roomInfo.isMarkedUnread,
|
||||
isFavourite: roomInfo.isFavourite)
|
||||
|
||||
Reference in New Issue
Block a user