adding a new None filter as the first item

This commit is contained in:
tibbi 2018-07-22 21:28:38 +02:00
parent d308dfb069
commit c17f77ceda
2 changed files with 5 additions and 1 deletions

View file

@ -47,7 +47,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:4.5.2'
implementation 'com.simplemobiletools:commons:4.5.3'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -27,6 +27,7 @@ import com.simplemobiletools.gallery.helpers.FilterThumbnailsManager
import com.simplemobiletools.gallery.models.FilterItem
import com.theartofdev.edmodo.cropper.CropImageView
import com.zomato.photofilters.FilterPack
import com.zomato.photofilters.imageprocessors.Filter
import kotlinx.android.synthetic.main.activity_edit.*
import kotlinx.android.synthetic.main.bottom_actions_aspect_ratio.*
import kotlinx.android.synthetic.main.bottom_editor_actions_filter.*
@ -259,6 +260,9 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
val filterThumbnailsManager = FilterThumbnailsManager()
filterThumbnailsManager.clearThumbs()
val noFilter = Filter(getString(R.string.none))
filterThumbnailsManager.addThumb(FilterItem(bitmap, noFilter))
FilterPack.getFilterPack(this).forEach {
val filterItem = FilterItem(bitmap, it)
filterThumbnailsManager.addThumb(filterItem)