mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Merge branch 'ismail/5068_start_thread' into ismail/5068_design_tweaks
This commit is contained in:
+7
-7
@@ -16,12 +16,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct ThreadRoomTitleViewModel {
|
||||
var roomAvatar: AvatarViewDataProtocol?
|
||||
var roomEncryptionBadge: UIImage?
|
||||
var roomDisplayName: String?
|
||||
struct ThreadRoomTitleModel {
|
||||
let roomAvatar: AvatarViewDataProtocol?
|
||||
let roomEncryptionBadge: UIImage?
|
||||
let roomDisplayName: String?
|
||||
|
||||
static let empty = ThreadRoomTitleViewModel(roomAvatar: nil,
|
||||
roomEncryptionBadge: nil,
|
||||
roomDisplayName: nil)
|
||||
static let empty = ThreadRoomTitleModel(roomAvatar: nil,
|
||||
roomEncryptionBadge: nil,
|
||||
roomDisplayName: nil)
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class ThreadRoomTitleView: RoomTitleView {
|
||||
|
||||
// MARK: - Methods
|
||||
|
||||
func configure(withViewModel viewModel: ThreadRoomTitleViewModel) {
|
||||
func configure(withViewModel viewModel: ThreadRoomTitleModel) {
|
||||
if let avatarViewData = viewModel.roomAvatar {
|
||||
roomAvatarView.fill(with: avatarViewData)
|
||||
} else {
|
||||
@@ -81,9 +81,9 @@ class ThreadRoomTitleView: RoomTitleView {
|
||||
encrpytionBadge = nil
|
||||
}
|
||||
|
||||
let viewModel = ThreadRoomTitleViewModel(roomAvatar: avatarViewData,
|
||||
roomEncryptionBadge: encrpytionBadge,
|
||||
roomDisplayName: room.displayName)
|
||||
let viewModel = ThreadRoomTitleModel(roomAvatar: avatarViewData,
|
||||
roomEncryptionBadge: encrpytionBadge,
|
||||
roomDisplayName: room.displayName)
|
||||
configure(withViewModel: viewModel)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user