fix crash

This commit is contained in:
Milos Kozak 2023-08-20 18:41:44 +02:00
parent b5a47af79a
commit 4ea54d9ead

View file

@ -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)