Clear history on decimal separator toggle
This commit is contained in:
parent
2af2a6175f
commit
a82ee7b113
|
@ -4,11 +4,13 @@ import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import com.simplemobiletools.calculator.R
|
import com.simplemobiletools.calculator.R
|
||||||
|
import com.simplemobiletools.calculator.extensions.calculatorDB
|
||||||
import com.simplemobiletools.calculator.extensions.config
|
import com.simplemobiletools.calculator.extensions.config
|
||||||
import com.simplemobiletools.calculator.extensions.refreshAppWidget
|
import com.simplemobiletools.calculator.extensions.refreshAppWidget
|
||||||
import com.simplemobiletools.calculator.helpers.MyWidgetProvider
|
import com.simplemobiletools.calculator.helpers.MyWidgetProvider
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||||
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
import kotlinx.android.synthetic.main.activity_settings.*
|
import kotlinx.android.synthetic.main.activity_settings.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
@ -104,6 +106,7 @@ class SettingsActivity : SimpleActivity() {
|
||||||
settings_use_comma_as_decimal_mark.toggle()
|
settings_use_comma_as_decimal_mark.toggle()
|
||||||
config.useCommaAsDecimalMark = settings_use_comma_as_decimal_mark.isChecked
|
config.useCommaAsDecimalMark = settings_use_comma_as_decimal_mark.isChecked
|
||||||
refreshAppWidget<MyWidgetProvider>()
|
refreshAppWidget<MyWidgetProvider>()
|
||||||
|
ensureBackgroundThread { applicationContext.calculatorDB.deleteHistory() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue