diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 973c0e218..28401776a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -68,7 +68,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList() private var isDragAndDropping = false - private var startReorderDragListener: StartReorderDragListener + private var startReorderDragListener: StartReorderDragListener? = null private var showMediaCount = config.showFolderMediaCount private var folderStyle = config.folderStyle @@ -77,15 +77,6 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList if (event.action == MotionEvent.ACTION_DOWN) { - startReorderDragListener.requestDrag(holder) + startReorderDragListener?.requestDrag(holder) } false }