Skip to content

Commit c361118

Browse files
committed
Merge branch 'develop'
2 parents ab5c226 + ea4c99b commit c361118

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [3.2.1](https://github.com/sds100/KeyMapper/releases/tag/v3.2.1)
2+
3+
#### 03 Sept 2025
4+
5+
## Bug fixes
6+
7+
- Do not crash when cancelling purchase
8+
19
## [3.2.0](https://github.com/sds100/KeyMapper/releases/tag/v3.2.0)
210

311
#### 02 Sept 2025

app/version.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
VERSION_NAME=3.2.0
2-
VERSION_CODE=131
1+
VERSION_NAME=3.2.1
2+
VERSION_CODE=132
33
VERSION_NUM=0

base/src/main/java/io/github/sds100/keymapper/base/utils/ErrorUtils.kt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package io.github.sds100.keymapper.base.utils
22

33
import android.content.pm.PackageManager
44
import io.github.sds100.keymapper.base.R
5+
import io.github.sds100.keymapper.base.purchasing.ProductId
6+
import io.github.sds100.keymapper.base.purchasing.PurchasingError
57
import io.github.sds100.keymapper.base.utils.ui.ResourceProvider
68
import io.github.sds100.keymapper.common.utils.BuildUtils
79
import io.github.sds100.keymapper.common.utils.KMError
@@ -173,6 +175,39 @@ fun KMError.getFullMessage(resourceProvider: ResourceProvider): String {
173175
KMError.InvalidBackup -> resourceProvider.getString(R.string.error_invalid_backup)
174176
KMError.MalformedUrl -> resourceProvider.getString(R.string.error_malformed_url)
175177
KMError.UiElementNotFound -> resourceProvider.getString(R.string.error_ui_element_not_found)
178+
179+
PurchasingError.PurchasingProcessError.Cancelled -> resourceProvider.getString(
180+
R.string.purchasing_error_cancelled,
181+
)
182+
183+
PurchasingError.PurchasingProcessError.NetworkError -> resourceProvider.getString(
184+
R.string.purchasing_error_network,
185+
)
186+
187+
PurchasingError.PurchasingProcessError.ProductNotFound -> resourceProvider.getString(
188+
R.string.purchasing_error_product_not_found,
189+
)
190+
191+
PurchasingError.PurchasingProcessError.StoreProblem -> resourceProvider.getString(
192+
R.string.purchasing_error_store_problem,
193+
)
194+
195+
PurchasingError.PurchasingProcessError.PaymentPending -> resourceProvider.getString(
196+
R.string.purchasing_error_payment_pending,
197+
)
198+
199+
PurchasingError.PurchasingProcessError.PurchaseInvalid -> resourceProvider.getString(
200+
R.string.purchasing_error_purchase_invalid,
201+
)
202+
203+
is PurchasingError.PurchasingProcessError.Unexpected -> message
204+
205+
is PurchasingError.ProductNotPurchased -> when (product) {
206+
ProductId.ASSISTANT_TRIGGER -> resourceProvider.getString(R.string.purchasing_error_assistant_not_purchased_home_screen)
207+
ProductId.FLOATING_BUTTONS -> resourceProvider.getString(R.string.purchasing_error_floating_buttons_not_purchased_home_screen)
208+
}
209+
210+
PurchasingError.PurchasingNotImplemented -> resourceProvider.getString(R.string.purchasing_error_not_implemented)
176211
else -> throw IllegalArgumentException("Unknown error $this")
177212
}
178213
}

0 commit comments

Comments
 (0)