Fix feed playback speed label refresh (#8623)

### Description
Fixes the per-podcast playback speed settings dialog so the numeric
speed value is shown immediately when the dialog is opened again.

Previously, the slider position was restored correctly, but the adjacent
numeric label could disappear after reopening the feed settings screen.
The dialog now refreshes the displayed speed label on initialization,
keeping the UI state consistent.



### Checklist
<!-- 
To help us keep the issue tracker clean and work as efficient as
possible,
  please make sure that you have done all of the following.
You can tick the boxes below by placing an x inside the brackets like
this: [x]
-->
- [ ] I have read the contribution guidelines:
https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request
- [x] I have performed a self-review of my code, going through my
changes line by line and carefully considering why this line change is
necessary
- [x] I have run the automated code checks using `./gradlew checkstyle
lint`
- [ ] My code follows the style guidelines of the AntennaPod project:
https://antennapod.org/contribute/develop/app/code-style
- [ ] I have mentioned the corresponding issue and the relevant keyword
(e.g., "Closes: #xy") in the description (see
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
- [ ] If it is a core feature, I have added automated tests
This commit is contained in:
yajasjohri
2026-07-27 10:48:56 +05:30
committed by GitHub
parent b7ee12ccfc
commit 9a36ea7596

View File

@ -416,10 +416,11 @@ public class FeedSettingsPreferenceFragment extends PreferenceFragmentCompat {
viewBinding.skipSilenceFeed.setAlpha(isChecked ? 0.4f : 1f);
});
float speed = feedPreferences.getFeedPlaybackSpeed();
FeedPreferences.SkipSilence skipSilence = feedPreferences.getFeedSkipSilence();
boolean isGlobal = speed == FeedPreferences.SPEED_USE_GLOBAL;
viewBinding.useGlobalCheckbox.setChecked(isGlobal);
viewBinding.seekBar.updateSpeed(isGlobal ? 1 : speed);
viewBinding.currentSpeedLabel.setText(String.format(Locale.getDefault(), "%.2fx", isGlobal ? 1 : speed));
FeedPreferences.SkipSilence skipSilence = feedPreferences.getFeedSkipSilence();
viewBinding.skipSilenceFeed.setChecked(!isGlobal
&& skipSilence == FeedPreferences.SkipSilence.AGGRESSIVE);
new MaterialAlertDialogBuilder(getContext())