mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fixes #2878 - Retain cycles on the ElementCall webView and correctly tear down the call on dismissal.
This commit is contained in:
committed by
Stefan Ceriu
parent
8bfd802793
commit
f8d094516d
@@ -41,6 +41,7 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
private let room: RoomProtocol
|
||||
private var widgetDriver: WidgetDriverAndHandle?
|
||||
|
||||
let widgetID = UUID().uuidString
|
||||
let messagePublisher = PassthroughSubject<String, Never>()
|
||||
|
||||
private let actionsSubject: PassthroughSubject<ElementCallWidgetDriverAction, Never> = .init()
|
||||
@@ -60,7 +61,7 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
let useEncryption = (try? room.isEncrypted()) ?? false
|
||||
|
||||
guard let widgetSettings = try? newVirtualElementCallWidget(props: .init(elementCallUrl: baseURL.absoluteString,
|
||||
widgetId: UUID().uuidString,
|
||||
widgetId: widgetID,
|
||||
parentUrl: nil,
|
||||
hideHeader: nil,
|
||||
preload: nil,
|
||||
|
||||
@@ -32,6 +32,8 @@ enum ElementCallWidgetDriverAction {
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol ElementCallWidgetDriverProtocol {
|
||||
var widgetID: String { get }
|
||||
|
||||
var messagePublisher: PassthroughSubject<String, Never> { get }
|
||||
var actions: AnyPublisher<ElementCallWidgetDriverAction, Never> { get }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user