mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:45:11 +00:00
Adopt new canOwnUser* power level methods instead of the throwing ones.
This commit is contained in:
committed by
Stefan Ceriu
parent
374fb722c6
commit
c7ff6c019d
+3
-3
@@ -218,9 +218,9 @@ class KnockRequestsListScreenViewModel: KnockRequestsListScreenViewModelType, Kn
|
||||
state.isKnockableRoom = false
|
||||
}
|
||||
|
||||
state.canAccept = (try? roomInfo.powerLevels.canUserInvite(userID: roomProxy.ownUserID).get()) == true
|
||||
state.canDecline = (try? roomInfo.powerLevels.canUserKick(userID: roomProxy.ownUserID).get()) == true
|
||||
state.canBan = (try? roomInfo.powerLevels.canUserBan(userID: roomProxy.ownUserID).get()) == true
|
||||
state.canAccept = roomInfo.powerLevels.canOwnUserInvite()
|
||||
state.canDecline = roomInfo.powerLevels.canOwnUserKick()
|
||||
state.canBan = roomInfo.powerLevels.canOwnUserBan()
|
||||
}
|
||||
|
||||
private static let loadingIndicatorIdentifier = "\(KnockRequestsListScreenViewModel.self)-Loading"
|
||||
|
||||
Reference in New Issue
Block a user