From 4ea54d9ead813b13066b346c2b7dcf00e6b01f3b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 20 Aug 2023 18:41:44 +0200 Subject: [PATCH] fix crash --- .../configuration/maintenance/MaintenanceFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/MaintenanceFragment.kt b/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/MaintenanceFragment.kt index 73d5e51242..48e152d2b4 100644 --- a/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/MaintenanceFragment.kt +++ b/plugins/configuration/src/main/java/info/nightscout/configuration/maintenance/MaintenanceFragment.kt @@ -32,6 +32,7 @@ import info.nightscout.rx.bus.RxBus import info.nightscout.rx.events.EventPreferenceChange import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.shared.extensions.runOnUiThread import info.nightscout.shared.extensions.toVisibility import info.nightscout.shared.interfaces.ResourceHelper import io.reactivex.rxjava3.core.Completable @@ -105,7 +106,7 @@ class MaintenanceFragment : DaggerFragment() { onError = { aapsLogger.error("Error clearing databases", it) }, onComplete = { rxBus.send(EventPreferenceChange(rh.gs(info.nightscout.core.utils.R.string.key_units))) - activity.recreate() + runOnUiThread { activity.recreate() } } ) uel.log(Action.RESET_DATABASES, Sources.Maintenance)