mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +00:00
Removed now unused loadDisplayName room proxy method
This commit is contained in:
committed by
Stefan Ceriu
parent
849e126eb0
commit
cf44ffb454
@@ -50,11 +50,7 @@ struct MockRoomProxy: RoomProxyProtocol {
|
|||||||
func displayNameForUserId(_ userId: String) -> String? {
|
func displayNameForUserId(_ userId: String) -> String? {
|
||||||
nil
|
nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadDisplayName() async -> Result<String, RoomProxyError> {
|
|
||||||
.failure(.failedRetrievingDisplayName)
|
|
||||||
}
|
|
||||||
|
|
||||||
func startLiveEventListener() { }
|
func startLiveEventListener() { }
|
||||||
|
|
||||||
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError> {
|
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError> {
|
||||||
|
|||||||
@@ -129,21 +129,7 @@ class RoomProxy: RoomProxyProtocol {
|
|||||||
return .failure(.failedRetrievingMemberDisplayName)
|
return .failure(.failedRetrievingMemberDisplayName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadDisplayName() async -> Result<String, RoomProxyError> {
|
|
||||||
if let displayName { return .success(displayName) }
|
|
||||||
|
|
||||||
do {
|
|
||||||
let displayName = try await Task.dispatch(on: serialDispatchQueue) {
|
|
||||||
try self.room.displayName()
|
|
||||||
}
|
|
||||||
update(displayName: displayName)
|
|
||||||
return .success(displayName)
|
|
||||||
} catch {
|
|
||||||
return .failure(.failedRetrievingDisplayName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError> {
|
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError> {
|
||||||
room.addTimelineListener(listener: listener)
|
room.addTimelineListener(listener: listener)
|
||||||
return .success(())
|
return .success(())
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ import Combine
|
|||||||
import MatrixRustSDK
|
import MatrixRustSDK
|
||||||
|
|
||||||
enum RoomProxyError: Error {
|
enum RoomProxyError: Error {
|
||||||
case failedRetrievingDisplayName
|
|
||||||
case failedRetrievingAvatar
|
|
||||||
case noMoreMessagesToBackPaginate
|
case noMoreMessagesToBackPaginate
|
||||||
case failedPaginatingBackwards
|
case failedPaginatingBackwards
|
||||||
case failedRetrievingMemberAvatarURL
|
case failedRetrievingMemberAvatarURL
|
||||||
@@ -53,8 +51,6 @@ protocol RoomProxyProtocol {
|
|||||||
|
|
||||||
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError>
|
func loadDisplayNameForUserId(_ userId: String) async -> Result<String?, RoomProxyError>
|
||||||
|
|
||||||
func loadDisplayName() async -> Result<String, RoomProxyError>
|
|
||||||
|
|
||||||
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError>
|
func addTimelineListener(listener: TimelineListener) -> Result<Void, RoomProxyError>
|
||||||
|
|
||||||
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError>
|
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError>
|
||||||
|
|||||||
Reference in New Issue
Block a user