Update info bar when changing playback speed (#7228)

This commit is contained in:
ByteHamster 2024-06-09 19:07:05 +02:00 committed by GitHub
parent 2d2ec14e5d
commit 46a409ad34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,7 @@ import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.snackbar.Snackbar;
import de.danoeh.antennapod.event.playback.SpeedChangedEvent;
import de.danoeh.antennapod.ui.screen.SearchFragment;
import de.danoeh.antennapod.net.download.serviceinterface.FeedUpdateManager;
import de.danoeh.antennapod.ui.episodes.PlaybackSpeedUtils;
@ -268,6 +269,11 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte
swipeRefreshLayout.setRefreshing(event.isFeedUpdateRunning);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void updateSpeed(SpeedChangedEvent event) {
refreshInfoBar();
}
@Override
public boolean onMenuItemClick(MenuItem item) {
final int itemId = item.getItemId();
@ -482,10 +488,8 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte
if (recyclerAdapter.inActionMode()) {
infoBar.setVisibility(View.INVISIBLE);
} else if (UserPreferences.getSubscriptionsFilter().isEnabled()) {
infoBar.setVisibility(View.VISIBLE);
} else {
infoBar.setVisibility(View.GONE);
infoBar.setVisibility(View.VISIBLE);
}
}