remove empty lines

This commit is contained in:
Axel Labarre 2023-05-10 22:35:02 +02:00
parent 74071bee5a
commit 9734007b59
3 changed files with 0 additions and 12 deletions

View File

@ -29,12 +29,9 @@ class MainActivity : SimpleActivity(), Calculator {
private var storedUseCommaAsDecimalMark = false private var storedUseCommaAsDecimalMark = false
private var decimalSeparator = DOT private var decimalSeparator = DOT
private var groupingSeparator = COMMA private var groupingSeparator = COMMA
private var saveCalculatorState: String = "" private var saveCalculatorState: String = ""
private lateinit var calc: CalculatorImpl private lateinit var calc: CalculatorImpl
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
isMaterialActivity = true isMaterialActivity = true
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
@ -42,8 +39,6 @@ class MainActivity : SimpleActivity(), Calculator {
appLaunched(BuildConfig.APPLICATION_ID) appLaunched(BuildConfig.APPLICATION_ID)
setupOptionsMenu() setupOptionsMenu()
refreshMenuItems() refreshMenuItems()
updateMaterialActivityViews(main_coordinator, null, useTransparentNavigation = false, useTopSearchMenu = false) updateMaterialActivityViews(main_coordinator, null, useTransparentNavigation = false, useTopSearchMenu = false)
setupMaterialScrollListener(main_nested_scrollview, main_toolbar) setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
@ -52,8 +47,6 @@ class MainActivity : SimpleActivity(), Calculator {
} }
calc = CalculatorImpl(this, applicationContext, decimalSeparator, groupingSeparator, saveCalculatorState) calc = CalculatorImpl(this, applicationContext, decimalSeparator, groupingSeparator, saveCalculatorState)
btn_plus.setOnClickOperation(PLUS) btn_plus.setOnClickOperation(PLUS)
btn_minus.setOnClickOperation(MINUS) btn_minus.setOnClickOperation(MINUS)
btn_multiply.setOnClickOperation(MULTIPLY) btn_multiply.setOnClickOperation(MULTIPLY)
@ -62,7 +55,6 @@ class MainActivity : SimpleActivity(), Calculator {
btn_power.setOnClickOperation(POWER) btn_power.setOnClickOperation(POWER)
btn_root.setOnClickOperation(ROOT) btn_root.setOnClickOperation(ROOT)
btn_minus.setOnLongClickListener { calc.turnToNegative() } btn_minus.setOnLongClickListener { calc.turnToNegative() }
btn_clear.setVibratingOnClickListener { calc.handleClear() } btn_clear.setVibratingOnClickListener { calc.handleClear() }
btn_clear.setOnLongClickListener { btn_clear.setOnLongClickListener {
calc.handleReset() calc.handleReset()
@ -78,7 +70,6 @@ class MainActivity : SimpleActivity(), Calculator {
btn_equals.setVibratingOnClickListener { calc.handleEquals() } btn_equals.setVibratingOnClickListener { calc.handleEquals() }
formula.setOnLongClickListener { copyToClipboard(false) } formula.setOnLongClickListener { copyToClipboard(false) }
result.setOnLongClickListener { copyToClipboard(true) } result.setOnLongClickListener { copyToClipboard(true) }
AutofitHelper.create(result) AutofitHelper.create(result)
AutofitHelper.create(formula) AutofitHelper.create(formula)
storeStateVariables() storeStateVariables()

View File

@ -433,7 +433,6 @@ class CalculatorImpl(
private fun String.removeGroupSeparator() = formatter.removeGroupingSeparator(this) private fun String.removeGroupSeparator() = formatter.removeGroupingSeparator(this)
fun getCalculatorStateJson(): JSONObject { fun getCalculatorStateJson(): JSONObject {
val jsonObj = JSONObject() val jsonObj = JSONObject()
jsonObj.put(RES, currentResult) jsonObj.put(RES, currentResult)

View File

@ -30,7 +30,6 @@ const val COMMA = ","
// shared prefs // shared prefs
const val USE_COMMA_AS_DECIMAL_MARK = "use_comma_as_decimal_mark" const val USE_COMMA_AS_DECIMAL_MARK = "use_comma_as_decimal_mark"
const val RES = "res" const val RES = "res"
const val PREVIOUS_CALCULATION = "previousCalculation" const val PREVIOUS_CALCULATION = "previousCalculation"
const val LAST_KEY = "lastKey" const val LAST_KEY = "lastKey"
@ -38,5 +37,4 @@ const val LAST_OPERATION = "lastOperation"
const val BASE_VALUE = "baseValue" const val BASE_VALUE = "baseValue"
const val SECOND_VALUE = "secondValue" const val SECOND_VALUE = "secondValue"
const val INPUT_DISPLAYED_FORMULA = "inputDisplayedFormula" const val INPUT_DISPLAYED_FORMULA = "inputDisplayedFormula"
const val CALCULATOR_STATE = "calculatorState" const val CALCULATOR_STATE = "calculatorState"