mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +01:00 
			
		
		
		
	Avoid passing max chapter number from tracker (fixes #2131)
This commit is contained in:
		@@ -56,6 +56,12 @@ class SetTrackChaptersDialog<T> : DialogController
 | 
			
		||||
            val np: NumberPicker = view.findViewById(R.id.chapters_picker)
 | 
			
		||||
            // Set initial value
 | 
			
		||||
            np.value = item.track?.last_chapter_read ?: 0
 | 
			
		||||
 | 
			
		||||
            // Enforce maximum value if tracker has total number of chapters set
 | 
			
		||||
            if (item.track != null && item.track.total_chapters > 0) {
 | 
			
		||||
                np.maxValue = item.track.total_chapters
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Don't allow to go from 0 to 9999
 | 
			
		||||
            np.wrapSelectorWheel = false
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user