From e5c9609362d226b1bca278fe0d3257f2a4b19f08 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Fri, 21 Jun 2024 08:50:27 +0200 Subject: [PATCH] Add missing subscribedStates personnalisation to HtmlReloader --- .../java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt b/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt index e41a58d..f4d1f2b 100644 --- a/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt +++ b/rich-html-editor/src/main/java/com/infomaniak/lib/richhtmleditor/EditorReloader.kt @@ -61,7 +61,7 @@ class EditorReloader(private val coroutineScope: CoroutineScope) { * * @throws IllegalStateException If the method is not called on the main thread. */ - suspend fun load(editor: RichHtmlEditorWebView, defaultHtml: String) { + suspend fun load(editor: RichHtmlEditorWebView, defaultHtml: String, subscribedStates: Set? = null) { if (Looper.myLooper() != Looper.getMainLooper()) error("The load method needs to be called on the main thread") if (needToReloadHtml) { @@ -69,7 +69,7 @@ class EditorReloader(private val coroutineScope: CoroutineScope) { if (it == null) return@collectLatest resetSavedHtml() - editor.setHtml(it) + editor.setHtml(it, subscribedStates) } } else { editor.setHtml(defaultHtml)