Attempting to move beyond the last or first entry in the media viewer no longer plays a navigation sound.

This commit is contained in:
Leon Styhre 2021-05-16 23:30:41 +02:00
parent 78e6e1a870
commit c6e4a81fa0

View file

@ -182,7 +182,8 @@ void MediaViewer::findMedia()
void MediaViewer::showNext() void MediaViewer::showNext()
{ {
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); if (mHasImages && mCurrentImageIndex != mImageFiles.size() - 1)
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND);
bool showedVideo = false; bool showedVideo = false;
@ -214,7 +215,8 @@ void MediaViewer::showNext()
void MediaViewer::showPrevious() void MediaViewer::showPrevious()
{ {
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); if ((mHasVideo && mDisplayingImage) || (!mHasVideo && mCurrentImageIndex != 0))
NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND);
if (mCurrentImageIndex == 0 && !mHasVideo) { if (mCurrentImageIndex == 0 && !mHasVideo) {
return; return;