mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 19:29:10 +01:00
Added File permisions check in manga details and recents
This commit is contained in:
parent
6753a3c6ff
commit
cd74c4d1ec
@ -1,5 +1,6 @@
|
||||
package eu.kanade.tachiyomi.ui.manga
|
||||
|
||||
import android.Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
import android.animation.Animator
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.animation.AnimatorSet
|
||||
@ -105,6 +106,7 @@ import eu.kanade.tachiyomi.util.system.toast
|
||||
import eu.kanade.tachiyomi.util.view.doOnApplyWindowInsets
|
||||
import eu.kanade.tachiyomi.util.view.getText
|
||||
import eu.kanade.tachiyomi.util.view.hide
|
||||
import eu.kanade.tachiyomi.util.view.requestPermissionsSafe
|
||||
import eu.kanade.tachiyomi.util.view.scrollViewWith
|
||||
import eu.kanade.tachiyomi.util.view.setBackground
|
||||
import eu.kanade.tachiyomi.util.view.setOnQueryTextChangeListener
|
||||
@ -216,6 +218,7 @@ class MangaDetailsController : BaseController,
|
||||
presenter.onCreate()
|
||||
swipe_refresh.isRefreshing = presenter.isLoading
|
||||
swipe_refresh.setOnRefreshListener { presenter.refreshAll() }
|
||||
requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301)
|
||||
}
|
||||
|
||||
override fun onDestroyView(view: View) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package eu.kanade.tachiyomi.ui.recents
|
||||
|
||||
import android.Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
@ -38,6 +39,7 @@ import eu.kanade.tachiyomi.ui.recently_read.RemoveHistoryDialog
|
||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import eu.kanade.tachiyomi.util.view.applyWindowInsetsForRootController
|
||||
import eu.kanade.tachiyomi.util.view.requestPermissionsSafe
|
||||
import eu.kanade.tachiyomi.util.view.scrollViewWith
|
||||
import eu.kanade.tachiyomi.util.view.setOnQueryTextChangeListener
|
||||
import eu.kanade.tachiyomi.util.view.setStyle
|
||||
@ -202,10 +204,11 @@ class RecentsController(bundle: Bundle? = null) : BaseController(bundle),
|
||||
dl_bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED
|
||||
}
|
||||
setPadding(dl_bottom_sheet.sheetBehavior?.isHideable == true)
|
||||
requestPermissionsSafe(arrayOf(WRITE_EXTERNAL_STORAGE), 301)
|
||||
}
|
||||
|
||||
fun setRefreshing(refresh: Boolean) {
|
||||
swipe_refresh.isRefreshing = false
|
||||
swipe_refresh.isRefreshing = refresh
|
||||
}
|
||||
|
||||
override fun onItemMove(fromPosition: Int, toPosition: Int) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user