mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
4850 bring leaving space experience in line with web (#6062)
* Bring leaving space experience in line with Web #4850 - Done
This commit is contained in:
+23
@@ -61,6 +61,13 @@ class MatrixItemChooserService: MatrixItemChooserServiceProtocol {
|
||||
var loadingText: String? {
|
||||
itemsProcessor.loadingText
|
||||
}
|
||||
var itemCount: Int {
|
||||
var itemCount = 0
|
||||
for section in sections {
|
||||
itemCount += section.items.count
|
||||
}
|
||||
return itemCount
|
||||
}
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
@@ -118,6 +125,22 @@ class MatrixItemChooserService: MatrixItemChooserServiceProtocol {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func selectAllItems() {
|
||||
var newSelection: Set<String> = Set()
|
||||
for section in sections {
|
||||
for item in section.items {
|
||||
newSelection.insert(item.id)
|
||||
}
|
||||
}
|
||||
self.selectedItemIds = newSelection
|
||||
selectedItemIdsSubject.send(selectedItemIds)
|
||||
}
|
||||
|
||||
func deselectAllItems() {
|
||||
self.selectedItemIds = Set()
|
||||
selectedItemIdsSubject.send(selectedItemIds)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
|
||||
Reference in New Issue
Block a user