mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:06:00 +00:00
Show a verification badge on the Room Member/User Profile screens. (#3427)
* Add a badge for verified users/room members. * Reorder subviews. * Add a (disabled) button to verify other users. * PR comments. * Update the SDK. * Adopt the SDK changes introduced in matrix-rust-sdk/pull/4100 --------- Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
@@ -4700,6 +4700,76 @@ class ClientProxyMock: ClientProxyProtocol {
|
||||
return resetIdentityReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - userIdentity
|
||||
|
||||
var userIdentityForUnderlyingCallsCount = 0
|
||||
var userIdentityForCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return userIdentityForUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = userIdentityForUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
userIdentityForUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
userIdentityForUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var userIdentityForCalled: Bool {
|
||||
return userIdentityForCallsCount > 0
|
||||
}
|
||||
var userIdentityForReceivedUserID: String?
|
||||
var userIdentityForReceivedInvocations: [String] = []
|
||||
|
||||
var userIdentityForUnderlyingReturnValue: Result<UserIdentity?, ClientProxyError>!
|
||||
var userIdentityForReturnValue: Result<UserIdentity?, ClientProxyError>! {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return userIdentityForUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: Result<UserIdentity?, ClientProxyError>? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = userIdentityForUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
userIdentityForUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
userIdentityForUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var userIdentityForClosure: ((String) async -> Result<UserIdentity?, ClientProxyError>)?
|
||||
|
||||
func userIdentity(for userID: String) async -> Result<UserIdentity?, ClientProxyError> {
|
||||
userIdentityForCallsCount += 1
|
||||
userIdentityForReceivedUserID = userID
|
||||
DispatchQueue.main.async {
|
||||
self.userIdentityForReceivedInvocations.append(userID)
|
||||
}
|
||||
if let userIdentityForClosure = userIdentityForClosure {
|
||||
return await userIdentityForClosure(userID)
|
||||
} else {
|
||||
return userIdentityForReturnValue
|
||||
}
|
||||
}
|
||||
//MARK: - loadMediaContentForSource
|
||||
|
||||
var loadMediaContentForSourceThrowableError: Error?
|
||||
|
||||
Reference in New Issue
Block a user