From a82ee7b11339864e014a97250cf69e6ddd1717ed Mon Sep 17 00:00:00 2001 From: Naveen Date: Sat, 4 Jun 2022 11:41:43 +0530 Subject: [PATCH] Clear history on decimal separator toggle --- .../calculator/activities/SettingsActivity.kt | 3 +++ 1 file changed, 3 insertions(+) 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() } } }