mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Implement in-memory decline cache for group calls
This commit is contained in:
@@ -61,6 +61,10 @@ final class JitsiService: NSObject {
|
||||
|
||||
private var httpClients: [String: MXHTTPClient] = [:]
|
||||
|
||||
/// Holds widgetIds for declined group calls. Made a map to speed up lookups.
|
||||
/// Values are useless, not used with false values.
|
||||
private var declinedJitsiWidgets: [String: Bool] = [:]
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
private override init() {
|
||||
@@ -69,6 +73,18 @@ final class JitsiService: NSObject {
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
func declineWidget(withId widgetId: String) {
|
||||
declinedJitsiWidgets[widgetId] = true
|
||||
}
|
||||
|
||||
func resetDeclineForWidget(withId widgetId: String) {
|
||||
declinedJitsiWidgets.removeValue(forKey: widgetId)
|
||||
}
|
||||
|
||||
func isWidgetDeclined(withId widgetId: String) -> Bool {
|
||||
return declinedJitsiWidgets[widgetId] == true
|
||||
}
|
||||
|
||||
// MARK: Configuration
|
||||
|
||||
func configureDefaultConferenceOptions(with serverURL: URL) {
|
||||
|
||||
Reference in New Issue
Block a user