Skip to content

Commit bda11ef

Browse files
Secozzijmir1
andauthored
fix: Crash on migration (#2079)
Co-authored-by: jmir1 <joel@miramon.de>
1 parent 67960f2 commit bda11ef

5 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/ISSUE_TEMPLATE/report_issue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ body:
5252
label: Aniyomi version
5353
description: You can find your Aniyomi version in **More → About**.
5454
placeholder: |
55-
Example: "0.18.0.0"
55+
Example: "0.18.0.1"
5656
validations:
5757
required: true
5858

@@ -97,7 +97,7 @@ body:
9797
required: true
9898
- label: I have gone through the [FAQ](https://aniyomi.org/docs/faq/general) and [troubleshooting guide](https://aniyomi.org/docs/guides/troubleshooting/).
9999
required: true
100-
- label: I have updated the app to version **[0.18.0.0](https://github.com/aniyomiorg/aniyomi/releases/latest)**.
100+
- label: I have updated the app to version **[0.18.0.1](https://github.com/aniyomiorg/aniyomi/releases/latest)**.
101101
required: true
102102
- label: I have filled out all of the requested information in this form, including specific version numbers.
103103
required: true

.github/ISSUE_TEMPLATE/request_feature.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ body:
3232
required: true
3333
- label: If this is a request regarding an extension, I should be opening an issue in the extension's repository.
3434
required: true
35-
- label: I have updated the app to version **[0.18.0.0](https://github.com/aniyomiorg/aniyomi/releases/latest)**.
35+
- label: I have updated the app to version **[0.18.0.1](https://github.com/aniyomiorg/aniyomi/releases/latest)**.
3636
required: true
3737
- label: I will fill out all of the requested information in this form.
3838
required: true

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
1010
- `Fixed` - for any bug fixes.
1111
- `Other` - for technical stuff.
1212

13+
## [v0.18.0.1] - 2025-07-06
14+
### Fixed
15+
16+
- Fix crash on migration ([@Secozzi](https://github.com/Secozzi)) ([#2079](https://github.com/aniyomiorg/aniyomi/pull/2079))
17+
1318
## [v0.18.0.0] - 2025-07-05
1419
### Added
1520

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020
applicationId = "xyz.jmir.tachiyomi.mi"
2121

2222
versionCode = 130
23-
versionName = "0.18.0.0"
23+
versionName = "0.18.0.1"
2424

2525
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
2626
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")

app/src/main/java/mihon/core/migration/migrations/VideoOrientationMigration.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@ class VideoOrientationMigration : Migration {
2020
val preferenceStore = migrationContext.get<PreferenceStore>() ?: return false
2121
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
2222

23-
val oldPref = prefs.getInt(
24-
playerPreferences.defaultPlayerOrientationType().key(),
25-
10,
26-
)
23+
val oldPref = try {
24+
prefs.getInt(
25+
playerPreferences.defaultPlayerOrientationType().key(),
26+
10,
27+
)
28+
} catch (_: ClassCastException) {
29+
prefs.edit(commit = true) {
30+
remove(playerPreferences.defaultPlayerOrientationType().key())
31+
}
32+
return true
33+
}
2734

2835
val newPref = when (oldPref) {
2936
ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR -> PlayerOrientation.Free

0 commit comments

Comments
 (0)