Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fixed issue that occurs after doing a percent operation ([#160])

## [1.2.0] - 2025-10-29
### Changed
- Compatibility updates for Android 15 & 16
Expand Down Expand Up @@ -60,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#31]: https://github.com/FossifyOrg/Calculator/issues/31
[#44]: https://github.com/FossifyOrg/Calculator/issues/44
[#64]: https://github.com/FossifyOrg/Calculator/issues/64
[#160]: https://github.com/FossifyOrg/Calculator/issues/160

[Unreleased]: https://github.com/FossifyOrg/Calculator/compare/1.2.0...HEAD
[1.2.0]: https://github.com/FossifyOrg/Calculator/compare/1.1.0...1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ class CalculatorImpl(
if (lastKey == DIGIT || lastKey == DECIMAL) {
if (lastOperation != "" && operation == PERCENT) {
handlePercent()
lastOperation = ""
} else {
// split to multiple lines just to see when does the crash happen
secondValue = when (operation) {
Expand All @@ -140,7 +141,7 @@ class CalculatorImpl(
if (getSecondValue() == BigDecimal.ZERO && inputDisplayedFormula.contains("÷")) {
lastKey = DIVIDE
lastOperation = DIVIDE
} else {
} else if(operation != PERCENT) {
lastKey = operation
lastOperation = operation
}
Expand Down Expand Up @@ -376,6 +377,7 @@ class CalculatorImpl(
if (newValue == "" || newValue == "0") {
newValue = "0"
lastKey = CLEAR
resetValues()
} else {
if (operations.contains(lastDeletedValue) || lastKey == EQUALS) {
lastOperation = ""
Expand Down
Loading