Memory usage optimization
This commit is contained in:
Pupil
2020-02-29 13:23:37 +09:00
parent 20bc9461de
commit 24486d13f2
8 changed files with 25 additions and 51 deletions

View File

@@ -226,7 +226,7 @@ class GalleryDialog(context: Context, private val galleryID: Int) : Dialog(conte
val inflater = LayoutInflater.from(context)
val galleries = ArrayList<GalleryBlock>()
val adapter = GalleryBlockAdapter(context, galleries).apply {
val adapter = GalleryBlockAdapter(Glide.with(ownerActivity ?: return), galleries).apply {
onChipClickedHandler.add { tag ->
this@GalleryDialog.onChipClickedHandler.forEach { handler ->
handler.invoke(tag)