mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Content Scanner Service (#5826)
* implemented the content scanner service with caching and a way to use in the state store context * fix swiftformat comment enforcing * pr suggestions
This commit is contained in:
@@ -20,6 +20,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
private let analyticsService: AnalyticsServiceProtocol
|
||||
|
||||
let mediaLoader: MediaLoaderProtocol
|
||||
let contentScanner: ContentScannerProxyProtocol?
|
||||
private let clientQueue: DispatchQueue
|
||||
|
||||
private var roomListService: RoomListService
|
||||
@@ -219,6 +220,16 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
mediaLoader = MediaLoader(client: client)
|
||||
|
||||
// Route media downloads through a content scanner when one has been configured for the server,
|
||||
// and expose a proxy for the active scanning of content in the timeline.
|
||||
if let contentScannerURL = appSettings.contentScannerURL.publisher.value, let client = client as? Client {
|
||||
let scanner = ContentScanner(scannerUrl: contentScannerURL.absoluteString)
|
||||
await client.setContentScanner(contentScanner: scanner)
|
||||
contentScanner = ContentScannerProxy(contentScanner: scanner, client: client)
|
||||
} else {
|
||||
contentScanner = nil
|
||||
}
|
||||
|
||||
notificationSettings = await NotificationSettingsProxy(notificationSettings: client.getNotificationSettings())
|
||||
|
||||
secureBackupController = SecureBackupController(encryption: client.encryption())
|
||||
|
||||
Reference in New Issue
Block a user