fix #139, toggle gif animation at folder cover

This commit is contained in:
tibbi 2017-03-19 10:15:21 +01:00
parent 4098090704
commit 69e67409fe
2 changed files with 1 additions and 5 deletions

View file

@ -16,7 +16,6 @@ import com.simplemobiletools.commons.dialogs.RenameItemDialog
import com.simplemobiletools.commons.extensions.beVisibleIf import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.toast import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.R
import com.simplemobiletools.gallery.activities.MediaActivity
import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.activities.SimpleActivity
import com.simplemobiletools.gallery.dialogs.CopyDialog import com.simplemobiletools.gallery.dialogs.CopyDialog
import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.extensions.*
@ -38,7 +37,6 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
val markedItems = HashSet<Int>() val markedItems = HashSet<Int>()
var foregroundColor = 0 var foregroundColor = 0
var backgroundColor = 0 var backgroundColor = 0
var animateGifs = true
var itemCnt = 0 var itemCnt = 0
fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) { fun toggleItemSelection(itemView: View, select: Boolean, pos: Int = -1) {
@ -68,7 +66,6 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
init { init {
foregroundColor = config.primaryColor foregroundColor = config.primaryColor
backgroundColor = config.backgroundColor backgroundColor = config.backgroundColor
animateGifs = config.animateGifs
itemCnt = media.size itemCnt = media.size
} }

View file

@ -18,7 +18,6 @@ import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.gallery.BuildConfig import com.simplemobiletools.gallery.BuildConfig
import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.R
import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.activities.SimpleActivity
import com.simplemobiletools.gallery.adapters.MediaAdapter
import com.simplemobiletools.gallery.helpers.NOMEDIA import com.simplemobiletools.gallery.helpers.NOMEDIA
import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE import com.simplemobiletools.gallery.helpers.REQUEST_EDIT_IMAGE
import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER import com.simplemobiletools.gallery.helpers.REQUEST_SET_WALLPAPER
@ -205,7 +204,7 @@ fun Activity.loadImage(path: String, target: MySquareImageView) {
.into(target) .into(target)
} }
} else if (path.isGif()) { } else if (path.isGif()) {
if (MediaAdapter.animateGifs) { if (config.animateGifs) {
Glide.with(this) Glide.with(this)
.load(path) .load(path)
.asGif() .asGif()