update filepicker to 1.5.2

This commit is contained in:
tibbi 2016-11-22 20:52:01 +01:00
parent f7f211cddf
commit a2bcfdbc7c
6 changed files with 14 additions and 20 deletions

View file

@ -43,7 +43,7 @@ dependencies {
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
compile 'com.booking:rtlviewpager:1.0.1'
compile 'com.simplemobiletools:fileproperties:1.0.5@aar'
compile 'com.simplemobiletools:filepicker:1.4.5@aar'
compile 'com.simplemobiletools:filepicker:1.5.2@aar'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

View file

@ -182,7 +182,7 @@ class MainActivity : SimpleActivity(), GetDirectoriesAsynctask.GetDirectoriesLis
if (dir.exists()) {
val files = dir.listFiles()
files.forEach {
if (it.isFile && it.isPhotoVideo()) {
if (it.isFile && it.isImageVideoGif()) {
updatedFiles.add(it)
deleteItem(it)
}

View file

@ -222,7 +222,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
for (delPath in mToBeDeleted) {
val file = File(delPath)
if (file.exists() && file.isPhotoVideo()) {
if (file.exists() && file.isImageVideoGif()) {
if (needsStupidWritePermissions(file.absolutePath)) {
if (isShowingPermDialog(file))
return

View file

@ -256,11 +256,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun askConfirmDelete() {
ConfirmationDialog(this, listener = object : ConfirmationDialog.OnConfirmedListener {
override fun onConfirmed() {
notifyDeletion()
}
})
ConfirmationDialog(this) {
notifyDeletion()
}
}
private fun notifyDeletion() {

View file

@ -186,12 +186,10 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList<Direc
}
private fun askConfirmDelete() {
ConfirmationDialog(activity, listener = object : ConfirmationDialog.OnConfirmedListener {
override fun onConfirmed() {
actMode?.finish()
prepareForDeleting()
}
})
ConfirmationDialog(activity) {
actMode?.finish()
prepareForDeleting()
}
}
private fun prepareForDeleting() {

View file

@ -136,12 +136,10 @@ class MediaAdapter(val activity: SimpleActivity, val media: MutableList<Medium>,
}
private fun askConfirmDelete() {
ConfirmationDialog(activity, listener = object : ConfirmationDialog.OnConfirmedListener {
override fun onConfirmed() {
actMode?.finish()
prepareForDeleting()
}
})
ConfirmationDialog(activity) {
actMode?.finish()
prepareForDeleting()
}
}
private fun prepareForDeleting() {