mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Merge branch 'develop' into ismail/4384_summary_db
This commit is contained in:
@@ -20,7 +20,12 @@ import Foundation
|
||||
public class RecentsListService: NSObject, RecentsListServiceProtocol {
|
||||
|
||||
private weak var session: MXSession?
|
||||
public private(set) var mode: RecentsDataSourceMode
|
||||
public private(set) var mode: RecentsDataSourceMode {
|
||||
didSet {
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
||||
public private(set) var query: String?
|
||||
public private(set) var space: MXSpace?
|
||||
|
||||
@@ -406,15 +411,18 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol {
|
||||
}
|
||||
|
||||
private func updateDirectFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) {
|
||||
switch mode {
|
||||
case .home:
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .lowPriority]
|
||||
case .people:
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = [.lowPriority]
|
||||
default:
|
||||
break
|
||||
var notDataTypes: MXRoomSummaryDataTypes = [.hidden, .conferenceUser, .space]
|
||||
switch mode {
|
||||
case .home:
|
||||
notDataTypes.insert([.invited, .favorited, .lowPriority])
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = notDataTypes
|
||||
case .people:
|
||||
notDataTypes.insert([.lowPriority])
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = notDataTypes
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func updateFavoritedFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) {
|
||||
switch mode {
|
||||
|
||||
Reference in New Issue
Block a user