some improvements to Copy
This commit is contained in:
parent
61946abbde
commit
035fde0a8f
2 changed files with 9 additions and 4 deletions
|
@ -97,10 +97,13 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
|
|||
updatedFiles.add(destination)
|
||||
}
|
||||
|
||||
context.scanFiles(updatedFiles) {}
|
||||
context.toast(R.string.moving_success)
|
||||
dismiss()
|
||||
copyMoveListener.copySucceeded(true, files.size * 2 == updatedFiles.size)
|
||||
context.scanFiles(updatedFiles) {
|
||||
activity.runOnUiThread {
|
||||
context.toast(R.string.moving_success)
|
||||
dismiss()
|
||||
copyMoveListener.copySucceeded(true, files.size * 2 == updatedFiles.size)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -88,7 +88,9 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
|
|||
setOnTouchListener { view, motionEvent -> checkDelete(); false }
|
||||
}
|
||||
} else {
|
||||
val state = (items_list.layoutManager as LinearLayoutManager).onSaveInstanceState()
|
||||
(currAdapter as ItemsAdapter).updateItems(mItems)
|
||||
(items_list.layoutManager as LinearLayoutManager).onRestoreInstanceState(state)
|
||||
}
|
||||
|
||||
getRecyclerLayoutManager().onRestoreInstanceState(arguments.getParcelable<Parcelable>(SCROLL_STATE))
|
||||
|
|
Loading…
Reference in a new issue