fix crash
This commit is contained in:
parent
b5a47af79a
commit
4ea54d9ead
|
@ -32,6 +32,7 @@ import info.nightscout.rx.bus.RxBus
|
||||||
import info.nightscout.rx.events.EventPreferenceChange
|
import info.nightscout.rx.events.EventPreferenceChange
|
||||||
import info.nightscout.rx.logging.AAPSLogger
|
import info.nightscout.rx.logging.AAPSLogger
|
||||||
import info.nightscout.rx.logging.LTag
|
import info.nightscout.rx.logging.LTag
|
||||||
|
import info.nightscout.shared.extensions.runOnUiThread
|
||||||
import info.nightscout.shared.extensions.toVisibility
|
import info.nightscout.shared.extensions.toVisibility
|
||||||
import info.nightscout.shared.interfaces.ResourceHelper
|
import info.nightscout.shared.interfaces.ResourceHelper
|
||||||
import io.reactivex.rxjava3.core.Completable
|
import io.reactivex.rxjava3.core.Completable
|
||||||
|
@ -105,7 +106,7 @@ class MaintenanceFragment : DaggerFragment() {
|
||||||
onError = { aapsLogger.error("Error clearing databases", it) },
|
onError = { aapsLogger.error("Error clearing databases", it) },
|
||||||
onComplete = {
|
onComplete = {
|
||||||
rxBus.send(EventPreferenceChange(rh.gs(info.nightscout.core.utils.R.string.key_units)))
|
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)
|
uel.log(Action.RESET_DATABASES, Sources.Maintenance)
|
||||||
|
|
Loading…
Reference in a new issue