Skip to content

Commit

Permalink
Fix restriction support for pref_auto_print_badges_option
Browse files Browse the repository at this point in the history
  • Loading branch information
robbi5 committed Nov 11, 2024
1 parent 3b4c1d9 commit 184de25
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,11 @@ class MainActivity : AppCompatActivity(), ReloadableActivity, ScannerView.Result
val prefs = PreferenceManager.getDefaultSharedPreferences(ctx)

for (key in restrictions.keySet()) {
prefs.edit().putBoolean(key, restrictions.getBoolean(key)).apply()
if (key == "pref_auto_print_badges_option") {
prefs.edit().putString(key, restrictions.getString(key)).apply()
} else {
prefs.edit().putBoolean(key, restrictions.getBoolean(key)).apply()
}
}
}

Expand Down

0 comments on commit 184de25

Please sign in to comment.