mirror of
				https://github.com/SimpleMobileTools/Simple-Gallery.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	simplify the SD card permission check at some activities
This commit is contained in:
		@@ -268,7 +268,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun deleteFiles(files: ArrayList<File>) {
 | 
			
		||||
        if (needsStupidWritePermissions(files[0].path) && isShowingPermDialog(files[0])) {
 | 
			
		||||
        if (isShowingPermDialog(files[0])) {
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -319,7 +319,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
 | 
			
		||||
 | 
			
		||||
    private fun deleteFile() {
 | 
			
		||||
        val file = File(mMedia[mPos].path)
 | 
			
		||||
        if (needsStupidWritePermissions(file.path) && isShowingPermDialog(file)) {
 | 
			
		||||
        if (isShowingPermDialog(file)) {
 | 
			
		||||
            return
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user