mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
do not make FilterThumbnailsManager static
This commit is contained in:
parent
efa93ef1a3
commit
0e7eac1650
2 changed files with 5 additions and 4 deletions
|
@ -254,14 +254,15 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||
val size = resources.getDimension(R.dimen.bottom_filters_thumbnail_height).toInt()
|
||||
val bitmap = Glide.with(this).asBitmap().load(uri).submit(size, size).get()
|
||||
runOnUiThread {
|
||||
FilterThumbnailsManager.clearThumbs()
|
||||
val filterThumbnailsManager = FilterThumbnailsManager()
|
||||
filterThumbnailsManager.clearThumbs()
|
||||
|
||||
FilterPack.getFilterPack(this).forEach {
|
||||
val filterItem = FilterItem(bitmap, it)
|
||||
FilterThumbnailsManager.addThumb(filterItem)
|
||||
filterThumbnailsManager.addThumb(filterItem)
|
||||
}
|
||||
|
||||
val filterItems = FilterThumbnailsManager.processThumbs()
|
||||
val filterItems = filterThumbnailsManager.processThumbs()
|
||||
val adapter = FiltersAdapter(filterItems) {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import android.graphics.Bitmap
|
|||
import com.simplemobiletools.gallery.models.FilterItem
|
||||
import java.util.*
|
||||
|
||||
object FilterThumbnailsManager {
|
||||
class FilterThumbnailsManager {
|
||||
private var filterThumbnails = ArrayList<FilterItem>(10)
|
||||
private var processedThumbnails = ArrayList<FilterItem>(10)
|
||||
|
||||
|
|
Loading…
Reference in a new issue