mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	Show menu when there's no next chapter
This commit is contained in:
		@@ -445,6 +445,15 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
 | 
			
		||||
        setMenuVisibility(!menuVisible)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Called from the viewer to show the menu.
 | 
			
		||||
     */
 | 
			
		||||
    fun showMenu() {
 | 
			
		||||
        if (!menuVisible) {
 | 
			
		||||
            setMenuVisibility(true)
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Called from the page sheet. It delegates the call to the presenter to do some IO, which
 | 
			
		||||
     * will call [onShareImageResult] with the path the image was saved on when it's ready.
 | 
			
		||||
 
 | 
			
		||||
@@ -152,6 +152,9 @@ abstract class PagerViewer(val activity: ReaderActivity) : BaseViewer {
 | 
			
		||||
        if (toChapter != null) {
 | 
			
		||||
            Timber.d("Request preload destination chapter because we're on the transition")
 | 
			
		||||
            activity.requestPreloadChapter(toChapter)
 | 
			
		||||
        } else if (transition is ChapterTransition.Next) {
 | 
			
		||||
            // No more chapters, show menu because the user is probably going to close the reader
 | 
			
		||||
            activity.showMenu()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -152,6 +152,9 @@ class WebtoonViewer(val activity: ReaderActivity) : BaseViewer {
 | 
			
		||||
        if (toChapter != null) {
 | 
			
		||||
            Timber.d("Request preload destination chapter because we're on the transition")
 | 
			
		||||
            activity.requestPreloadChapter(toChapter)
 | 
			
		||||
        } else if (transition is ChapterTransition.Next) {
 | 
			
		||||
            // No more chapters, show menu because the user is probably going to close the reader
 | 
			
		||||
            activity.showMenu()
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user