replace Delete with Remove at Manage excluded/included folders
This commit is contained in:
parent
923ba8b99c
commit
b351de406b
|
@ -42,7 +42,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.5.9'
|
||||
implementation 'com.simplemobiletools:commons:3.5.11'
|
||||
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.9.0'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
|
||||
implementation 'com.android.support:multidex:1.0.2'
|
||||
|
|
|
@ -511,12 +511,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
.load(File(path))
|
||||
.apply(options)
|
||||
.into(object : SimpleTarget<Bitmap>() {
|
||||
override fun onResourceReady(resource: Bitmap?, transition: Transition<in Bitmap>?) {
|
||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
||||
try {
|
||||
WallpaperManager.getInstance(applicationContext).setBitmap(resource)
|
||||
setResult(Activity.RESULT_OK)
|
||||
} catch (ignored: IOException) {
|
||||
|
||||
}
|
||||
|
||||
finish()
|
||||
|
|
|
@ -94,7 +94,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
|
|||
override fun onViewRecycled(holder: ViewHolder?) {
|
||||
super.onViewRecycled(holder)
|
||||
if (!activity.isActivityDestroyed()) {
|
||||
Glide.with(activity).clear(holder?.itemView?.dir_thumbnail)
|
||||
Glide.with(activity).clear(holder?.itemView?.dir_thumbnail!!)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
|
||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||
import com.simplemobiletools.gallery.R
|
||||
|
@ -18,7 +17,7 @@ class ManageFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList<
|
|||
|
||||
private val config = activity.config
|
||||
|
||||
override fun getActionMenuId() = R.menu.cab_delete_only
|
||||
override fun getActionMenuId() = R.menu.cab_remove_only
|
||||
|
||||
override fun prepareActionMode(menu: Menu) {}
|
||||
|
||||
|
@ -30,7 +29,7 @@ class ManageFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList<
|
|||
|
||||
override fun actionItemPressed(id: Int) {
|
||||
when (id) {
|
||||
R.id.cab_delete -> askConfirmDelete()
|
||||
R.id.cab_remove -> removeSelection()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,13 +56,7 @@ class ManageFoldersAdapter(activity: BaseSimpleActivity, var folders: ArrayList<
|
|||
}
|
||||
}
|
||||
|
||||
private fun askConfirmDelete() {
|
||||
ConfirmationDialog(activity) {
|
||||
deleteSelection()
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteSelection() {
|
||||
private fun removeSelection() {
|
||||
val removeFolders = ArrayList<String>(selectedPositions.size)
|
||||
|
||||
selectedPositions.sortedDescending().forEach {
|
||||
|
|
|
@ -106,7 +106,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||
if (!activity.isActivityDestroyed()) {
|
||||
val itemView = holder?.itemView
|
||||
visibleItemPaths.remove(itemView?.photo_name?.tag)
|
||||
Glide.with(activity).clear(itemView?.medium_thumbnail)
|
||||
Glide.with(activity).clear(itemView?.medium_thumbnail!!)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (activity?.isActivityDestroyed() == false) {
|
||||
Glide.with(context).clear(view.gif_view)
|
||||
Glide.with(context!!).clear(view.gif_view)
|
||||
view.subsampling_view.recycle()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,6 @@ class GlideRotateTransformation(context: Context, val rotateRotationAngle: Float
|
|||
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
|
||||
}
|
||||
|
||||
override fun updateDiskCacheKey(messageDigest: MessageDigest?) {
|
||||
override fun updateDiskCacheKey(messageDigest: MessageDigest) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue