From 1091b37fe7585a5b8fa107afa4dc1cff36ba2dbe Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 20 Nov 2024 14:24:16 +0100 Subject: [PATCH] log entering/leaving realtime this is useful for debugging. ftr, using deinit() seems to be file as this is called through "Automatic Reference Counting", not garbage collection at a later point (https://docs.swift.org/swift-book/documentation/the-swift-programming-language/deinitialization/ ) --- deltachat-ios/Controller/WebxdcViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deltachat-ios/Controller/WebxdcViewController.swift b/deltachat-ios/Controller/WebxdcViewController.swift index 77edc1629..feadbf72c 100644 --- a/deltachat-ios/Controller/WebxdcViewController.swift +++ b/deltachat-ios/Controller/WebxdcViewController.swift @@ -291,6 +291,7 @@ class WebxdcViewController: WebViewViewController { } deinit { + logger.info("⬅️ leave realtime by deinit") dcContext.leaveWebxdcRealtime(messageId: messageId) } @@ -516,6 +517,7 @@ extension WebxdcViewController: WKScriptMessageHandler { } case .sendRealtimeAdvertisement: + logger.info("➡️ send realtime advertisement") dcContext.sendWebxdcRealtimeAdvertisement(messageId: messageId) case .sendRealtimeData: @@ -524,6 +526,7 @@ extension WebxdcViewController: WKScriptMessageHandler { } case .leaveRealtime: + logger.info("⬅️ leave realtime by xdc request") dcContext.leaveWebxdcRealtime(messageId: messageId) } }