mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Bump the SDK to v25.06.25; adopt the new optional RoomInfo joinRule and isPublic.
This commit is contained in:
committed by
Stefan Ceriu
parent
8dc389cd54
commit
46f49af930
@@ -40,7 +40,6 @@ extension RoomInfoProxyMock {
|
||||
avatarURL = configuration.avatarURL
|
||||
|
||||
isDirect = false
|
||||
isPublic = false
|
||||
isSpace = false
|
||||
successor = nil
|
||||
isFavourite = false
|
||||
|
||||
@@ -13427,16 +13427,6 @@ class RoomInfoProxyMock: RoomInfoProxyProtocol, @unchecked Sendable {
|
||||
set(value) { underlyingIsDirect = value }
|
||||
}
|
||||
var underlyingIsDirect: Bool!
|
||||
var isPublic: Bool {
|
||||
get { return underlyingIsPublic }
|
||||
set(value) { underlyingIsPublic = value }
|
||||
}
|
||||
var underlyingIsPublic: Bool!
|
||||
var isPrivate: Bool {
|
||||
get { return underlyingIsPrivate }
|
||||
set(value) { underlyingIsPrivate = value }
|
||||
}
|
||||
var underlyingIsPrivate: Bool!
|
||||
var isSpace: Bool {
|
||||
get { return underlyingIsSpace }
|
||||
set(value) { underlyingIsSpace = value }
|
||||
|
||||
@@ -44,7 +44,6 @@ extension RoomInfoProxyMock {
|
||||
avatarURL = configuration.avatarURL
|
||||
|
||||
isDirect = false
|
||||
isPublic = false
|
||||
isSpace = false
|
||||
successor = nil
|
||||
isFavourite = false
|
||||
|
||||
@@ -21,7 +21,6 @@ struct JoinedRoomProxyMockConfiguration {
|
||||
var avatarURL: URL?
|
||||
var isDirect = false
|
||||
var isSpace = false
|
||||
var isPublic = false
|
||||
var isEncrypted = true
|
||||
var hasOngoingCall = true
|
||||
var canonicalAlias: String?
|
||||
@@ -38,7 +37,7 @@ struct JoinedRoomProxyMockConfiguration {
|
||||
|
||||
var shouldUseAutoUpdatingTimeline = false
|
||||
|
||||
var joinRule: JoinRule?
|
||||
var joinRule: JoinRule? = .invite
|
||||
var membership: Membership = .joined
|
||||
|
||||
var isVisibleInPublicDirectory = false
|
||||
@@ -172,7 +171,6 @@ extension RoomInfoProxyMock {
|
||||
topic = configuration.topic
|
||||
avatarURL = configuration.avatarURL
|
||||
isDirect = configuration.isDirect
|
||||
isPublic = configuration.isPublic
|
||||
isSpace = configuration.isSpace
|
||||
successor = configuration.successor
|
||||
isFavourite = false
|
||||
|
||||
@@ -40,7 +40,6 @@ extension RoomInfoProxyMock {
|
||||
avatarURL = configuration.avatarURL
|
||||
|
||||
isDirect = false
|
||||
isPublic = false
|
||||
isSpace = false
|
||||
successor = nil
|
||||
isFavourite = false
|
||||
|
||||
@@ -364,7 +364,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
return
|
||||
}
|
||||
|
||||
if roomProxy.infoPublisher.value.isPublic {
|
||||
if !roomProxy.infoPublisher.value.isPrivate {
|
||||
state.bindings.leaveRoomAlertItem = LeaveRoomAlertItem(roomID: roomID, isDM: roomProxy.isDirectOneToOneRoom, state: .public)
|
||||
} else {
|
||||
state.bindings.leaveRoomAlertItem = if roomProxy.infoPublisher.value.joinedMembersCount > 1 {
|
||||
|
||||
@@ -125,7 +125,7 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
}
|
||||
state.bindings.leaveRoomAlertItem = LeaveRoomAlertItem(roomID: roomProxy.id,
|
||||
isDM: roomProxy.isDirectOneToOneRoom,
|
||||
state: roomProxy.infoPublisher.value.isPublic ? .public : .private)
|
||||
state: roomProxy.infoPublisher.value.isPrivate ? .private : .public)
|
||||
case .confirmLeave:
|
||||
Task { await leaveRoom() }
|
||||
case .processTapIgnore:
|
||||
|
||||
@@ -338,13 +338,13 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
RoomDetailsScreen(context: genericRoomViewModel.context)
|
||||
.snapshotPreferences(expect: genericRoomViewModel.context.$viewState.map { state in
|
||||
state.canSeeSecurityAndPrivacy == true
|
||||
state.permalink != nil
|
||||
})
|
||||
.previewDisplayName("Generic Room")
|
||||
|
||||
RoomDetailsScreen(context: simpleRoomViewModel.context)
|
||||
.snapshotPreferences(expect: simpleRoomViewModel.context.$viewState.map { state in
|
||||
state.canSeeSecurityAndPrivacy == true
|
||||
state.permalink != nil
|
||||
})
|
||||
.previewDisplayName("Simple Room")
|
||||
|
||||
@@ -356,7 +356,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
RoomDetailsScreen(context: dmRoomVerifiedViewModel.context)
|
||||
.snapshotPreferences(expect: dmRoomVerifiedViewModel.context.$viewState.map { state in
|
||||
state.accountOwner != nil
|
||||
state.dmRecipientInfo?.verificationState == .verified
|
||||
})
|
||||
.previewDisplayName("DM Room Verified")
|
||||
|
||||
|
||||
@@ -27,9 +27,8 @@ struct RoomInfoProxy: RoomInfoProxyProtocol {
|
||||
var isEncrypted: Bool { roomInfo.encryptionState == .encrypted }
|
||||
|
||||
var isDirect: Bool { roomInfo.isDirect }
|
||||
var isPublic: Bool { roomInfo.isPublic }
|
||||
|
||||
var isSpace: Bool { roomInfo.isSpace }
|
||||
|
||||
var successor: SuccessorRoom? { roomInfo.successorRoom }
|
||||
var isFavourite: Bool { roomInfo.isFavourite }
|
||||
var canonicalAlias: String? { roomInfo.canonicalAlias }
|
||||
@@ -72,6 +71,6 @@ struct RoomPreviewInfoProxy: BaseRoomInfoProxyProtocol {
|
||||
var activeMembersCount: Int { Int(roomPreviewInfo.numActiveMembers ?? roomPreviewInfo.numJoinedMembers) }
|
||||
var joinedMembersCount: Int { Int(roomPreviewInfo.numJoinedMembers) }
|
||||
|
||||
var joinRule: JoinRule { roomPreviewInfo.joinRule }
|
||||
var joinRule: JoinRule? { roomPreviewInfo.joinRule }
|
||||
var membership: Membership? { roomPreviewInfo.membership }
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@ protocol RoomInfoProxyProtocol: BaseRoomInfoProxyProtocol {
|
||||
|
||||
var isEncrypted: Bool { get }
|
||||
var isDirect: Bool { get }
|
||||
var isPublic: Bool { get }
|
||||
|
||||
var isPrivate: Bool { get }
|
||||
|
||||
var isSpace: Bool { get }
|
||||
|
||||
var isFavourite: Bool { get }
|
||||
|
||||
var canonicalAlias: String? { get }
|
||||
var alternativeAliases: [String] { get }
|
||||
var membership: Membership { get }
|
||||
|
||||
@@ -188,7 +188,7 @@ extension JoinedRoomProxyProtocol {
|
||||
avatar: infoPublisher.value.avatar,
|
||||
canonicalAlias: infoPublisher.value.canonicalAlias,
|
||||
isEncrypted: infoPublisher.value.isEncrypted,
|
||||
isPublic: infoPublisher.value.isPublic,
|
||||
isPublic: !infoPublisher.value.isPrivate,
|
||||
isDirect: infoPublisher.value.isDirect)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user