mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
#53 - Refactored various components:
- updated the authentication coordinator to use async await - replaced the UserSession with a ClientProxy (similar to the RoomProxy) - renamed `completion` to `callback` on the coordinators and view models - renamed `viewModelResult` to `viewModelAction` - introduced back UserSession as a user specific service container
This commit is contained in:
committed by
Stefan Ceriu
parent
edf765b7cd
commit
1b4d3a650e
@@ -157,13 +157,13 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
return
|
||||
}
|
||||
|
||||
switch await memberDetailProvider.loadAvatarURLForUserId(timelineItem.senderId) {
|
||||
case .success(let avatarURL):
|
||||
guard let avatarURL = avatarURL else {
|
||||
switch await memberDetailProvider.loadAvatarURLStringForUserId(timelineItem.senderId) {
|
||||
case .success(let avatarURLString):
|
||||
guard let avatarURLString = avatarURLString else {
|
||||
return
|
||||
}
|
||||
|
||||
switch await mediaProvider.loadImageFromURL(avatarURL) {
|
||||
switch await mediaProvider.loadImageFromURLString(avatarURLString) {
|
||||
case .success(let avatar):
|
||||
guard let index = timelineItems.firstIndex(where: { $0.id == timelineItem.id }),
|
||||
var item = timelineItems[index] as? EventBasedTimelineItemProtocol else {
|
||||
|
||||
@@ -24,8 +24,8 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
|
||||
func buildTimelineItemFor(message: RoomMessageProtocol, showSenderDetails: Bool) -> RoomTimelineItemProtocol {
|
||||
let displayName = memberDetailProvider.displayNameForUserId(message.sender)
|
||||
let avatarURL = memberDetailProvider.avatarURLForUserId(message.sender)
|
||||
let avatarImage = mediaProvider.imageFromURL(avatarURL)
|
||||
let avatarURL = memberDetailProvider.avatarURLStringForUserId(message.sender)
|
||||
let avatarImage = mediaProvider.imageFromURLString(avatarURL)
|
||||
|
||||
switch message {
|
||||
case let message as TextRoomMessage:
|
||||
|
||||
Reference in New Issue
Block a user