create filter thumbnails just once, not at every filter toggle

This commit is contained in:
tibbi 2018-07-20 11:48:56 +02:00
parent 0e7eac1650
commit efa2c9777e

View file

@ -249,7 +249,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
bottom_editor_filter_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_FILTER) bottom_editor_filter_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_FILTER)
bottom_editor_crop_rotate_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE) bottom_editor_crop_rotate_actions.beVisibleIf(currPrimaryAction == PRIMARY_ACTION_CROP_ROTATE)
if (currPrimaryAction == PRIMARY_ACTION_FILTER) { if (currPrimaryAction == PRIMARY_ACTION_FILTER && bottom_actions_filter_list.adapter == null) {
Thread { Thread {
val size = resources.getDimension(R.dimen.bottom_filters_thumbnail_height).toInt() val size = resources.getDimension(R.dimen.bottom_filters_thumbnail_height).toInt()
val bitmap = Glide.with(this).asBitmap().load(uri).submit(size, size).get() val bitmap = Glide.with(this).asBitmap().load(uri).submit(size, size).get()