Skip to content

Commit

Permalink
Fix value update
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Jan 1, 2025
1 parent e3cafcf commit 187948f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,16 @@ class SettingsFragment : PreferenceFragmentCompat() {
dictCategory.isVisible = showGreek || showHebrew || showGreekMorph
val fontSizeMultiplier = preferenceScreen.findPreference<SeekBarPreference>("font_size_multiplier") as SeekBarPreference

fun getFontSizeMultiplierSummary() =
fun getFontSizeMultiplierSummary(value: Int) =
getString(R.string.pref_font_size_multiplier_summary_1) + " " +
getString(R.string.pref_font_size_multiplier_summary_2) + " " +
getString(R.string.current_value,
String.format(Locale.getDefault(), "%1.1fx",
CommonUtils.settings.fontSizeMultiplierFloat)
String.format(Locale.getDefault(), "%1.1fx", value / 100F)
)

fontSizeMultiplier.summary = getFontSizeMultiplierSummary()
fontSizeMultiplier.summary = getFontSizeMultiplierSummary(CommonUtils.settings.fontSizeMultiplier)
fontSizeMultiplier.setOnPreferenceChangeListener { pref, newValue ->
fontSizeMultiplier.summary = getFontSizeMultiplierSummary()
fontSizeMultiplier.summary = getFontSizeMultiplierSummary(newValue as Int)
true
}

Expand Down

0 comments on commit 187948f

Please sign in to comment.