mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
[Spaces] M10.4.1 Home space data filtering #4570
- Improved visual feedback when switching home settings
This commit is contained in:
@@ -23,11 +23,30 @@ enum SpaceMenuListItemStyle {
|
||||
case destructive
|
||||
}
|
||||
|
||||
/// `SpaceMenuListItemViewDataDelegate` allows the table view cell to update its view accordingly with it's related data change
|
||||
protocol SpaceMenuListItemViewDataDelegate: AnyObject {
|
||||
func spaceMenuItemValueDidChange(_ item: SpaceMenuListItemViewData)
|
||||
}
|
||||
|
||||
/// `SpaceMenuListViewCell` view data
|
||||
struct SpaceMenuListItemViewData {
|
||||
class SpaceMenuListItemViewData {
|
||||
let actionId: String
|
||||
let style: SpaceMenuListItemStyle
|
||||
let title: String?
|
||||
let icon: UIImage?
|
||||
var value: Any?
|
||||
|
||||
var value: Any? {
|
||||
didSet {
|
||||
delegate?.spaceMenuItemValueDidChange(self)
|
||||
}
|
||||
}
|
||||
weak var delegate: SpaceMenuListItemViewDataDelegate?
|
||||
|
||||
init(actionId: String, style: SpaceMenuListItemStyle, title: String?, icon: UIImage?, value: Any?) {
|
||||
self.actionId = actionId
|
||||
self.style = style
|
||||
self.title = title
|
||||
self.icon = icon
|
||||
self.value = value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user