mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
adding a widget crashfix
This commit is contained in:
@ -62,7 +62,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:9cb42cbf35'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:fe2610738c'
|
||||||
implementation 'me.grantland:autofittextview:0.2.1'
|
implementation 'me.grantland:autofittextview:0.2.1'
|
||||||
implementation 'net.objecthunter:exp4j:0.4.8'
|
implementation 'net.objecthunter:exp4j:0.4.8'
|
||||||
|
|
||||||
|
@ -288,7 +288,8 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun handleClear() {
|
fun handleClear() {
|
||||||
val lastDeletedValue = inputDisplayedFormula.last().toString()
|
val lastDeletedValue = inputDisplayedFormula.lastOrNull().toString()
|
||||||
|
|
||||||
var newValue = inputDisplayedFormula.dropLast(1)
|
var newValue = inputDisplayedFormula.dropLast(1)
|
||||||
if (newValue == "") {
|
if (newValue == "") {
|
||||||
newValue = "0"
|
newValue = "0"
|
||||||
|
Reference in New Issue
Block a user