mirror of
				https://github.com/SimpleMobileTools/Simple-Calculator.git
				synced 2025-06-05 21:49:13 +02:00 
			
		
		
		
	some bugfixes
This commit is contained in:
		| @@ -82,7 +82,7 @@ class CalculatorImpl { | |||||||
|     private fun formatString(str: String): String { |     private fun formatString(str: String): String { | ||||||
|         // if the number contains a decimal, do not try removing the leading zero anymore, nor add group separator |         // if the number contains a decimal, do not try removing the leading zero anymore, nor add group separator | ||||||
|         // it would prevent writing values like 1.02 |         // it would prevent writing values like 1.02 | ||||||
|         if (str.contains("")) |         if (str.contains(".")) | ||||||
|             return str |             return str | ||||||
|  |  | ||||||
|         val doubleValue = Formatter.stringToDouble(str) |         val doubleValue = Formatter.stringToDouble(str) | ||||||
| @@ -165,8 +165,8 @@ class CalculatorImpl { | |||||||
|  |  | ||||||
|     private fun decimalClicked() { |     private fun decimalClicked() { | ||||||
|         var value = displayedNumber |         var value = displayedNumber | ||||||
|         if (!value!!.contains("")) |         if (!value!!.contains(".")) | ||||||
|             value += "" |             value += "." | ||||||
|         setValue(value) |         setValue(value) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user