diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt index 83179320..b99a0461 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/SettingsActivity.kt @@ -4,11 +4,13 @@ import android.content.Intent import android.os.Bundle import android.view.Menu import com.simplemobiletools.calculator.R +import com.simplemobiletools.calculator.extensions.calculatorDB import com.simplemobiletools.calculator.extensions.config import com.simplemobiletools.calculator.extensions.refreshAppWidget import com.simplemobiletools.calculator.helpers.MyWidgetProvider import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS +import com.simplemobiletools.commons.helpers.ensureBackgroundThread import kotlinx.android.synthetic.main.activity_settings.* import java.util.* import kotlin.system.exitProcess @@ -104,6 +106,7 @@ class SettingsActivity : SimpleActivity() { settings_use_comma_as_decimal_mark.toggle() config.useCommaAsDecimalMark = settings_use_comma_as_decimal_mark.isChecked refreshAppWidget() + ensureBackgroundThread { applicationContext.calculatorDB.deleteHistory() } } }