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:
+2
-2
@@ -16,12 +16,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct ThreadViewModel {
|
||||
struct ThreadModel {
|
||||
var rootMessageSenderUserId: String?
|
||||
var rootMessageSenderAvatar: AvatarViewDataProtocol?
|
||||
var rootMessageSenderDisplayName: String?
|
||||
var rootMessageText: NSAttributedString?
|
||||
var rootMessageRedacted: Bool
|
||||
var lastMessageTime: String?
|
||||
var summaryViewModel: ThreadSummaryViewModel?
|
||||
var summaryViewModel: ThreadSummaryModel?
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class ThreadTableViewCell: UITableViewCell {
|
||||
separatorInset = Constants.separatorInset
|
||||
}
|
||||
|
||||
func configure(withViewModel viewModel: ThreadViewModel) {
|
||||
func configure(withViewModel viewModel: ThreadModel) {
|
||||
if let rootAvatar = viewModel.rootMessageSenderAvatar {
|
||||
rootMessageAvatarView.fill(with: rootAvatar)
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct ThreadListEmptyViewModel {
|
||||
struct ThreadListEmptyModel {
|
||||
let icon: UIImage?
|
||||
let title: String?
|
||||
let info: String?
|
||||
@@ -22,6 +22,7 @@ protocol ThreadListEmptyViewDelegate: AnyObject {
|
||||
func threadListEmptyViewTappedShowAllThreads(_ emptyView: ThreadListEmptyView)
|
||||
}
|
||||
|
||||
/// View to be shown on the thread list screen when no thread is available. Use a `ThreadListEmptyModel` instance to configure.
|
||||
class ThreadListEmptyView: UIView {
|
||||
|
||||
@IBOutlet weak var delegate: ThreadListEmptyViewDelegate?
|
||||
@@ -38,7 +39,7 @@ class ThreadListEmptyView: UIView {
|
||||
loadNibContent()
|
||||
}
|
||||
|
||||
func configure(withViewModel viewModel: ThreadListEmptyViewModel) {
|
||||
func configure(withViewModel viewModel: ThreadListEmptyModel) {
|
||||
iconView.image = viewModel.icon
|
||||
titleLabel.text = viewModel.title
|
||||
infoLabel.text = viewModel.info
|
||||
|
||||
Reference in New Issue
Block a user