Skip to content

Commit

Permalink
bugfix: crashes caused by ChangelogActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEmperor committed Jan 30, 2024
1 parent b07effb commit 5a3176c
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ protected void onCreate(Bundle savedInstanceState) {

if (lastVersionCode < 24) {
String newTts = "off";
if (sp.getBoolean("net.devemperor.wristassist.tts", false)) {
if (sp.getBoolean("net.devemperor.wristassist.auto_tts", false)) newTts = "on_auto";
else newTts = "on";
}
try { // on first app launch, in newer versions the tts setting is a string, not a boolean
if (sp.getBoolean("net.devemperor.wristassist.tts", false)) {
if (sp.getBoolean("net.devemperor.wristassist.auto_tts", false))
newTts = "on_auto";
else newTts = "on";
}
} catch (ClassCastException ignored) { }
sp.edit().putString("net.devemperor.wristassist.tts", newTts).apply();
md = md.concat(getString(R.string.changelog_md_24));
}
Expand Down

0 comments on commit 5a3176c

Please sign in to comment.