mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-16 20:00:36 +01:00
simplify the copydialog constructor
This commit is contained in:
parent
e87b6553a1
commit
3ce7d682b6
@ -368,7 +368,7 @@ public class ItemsFragment extends android.support.v4.app.Fragment
|
||||
itemsToCopy.add(new File(item.getPath()));
|
||||
}
|
||||
|
||||
new CopyDialog(getActivity(), itemsToCopy, mPath, this, new CopyDialog.OnCopyListener() {
|
||||
new CopyDialog(getActivity(), itemsToCopy, this, new CopyDialog.OnCopyListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
fillItems();
|
||||
|
@ -19,11 +19,12 @@ import com.simplemobiletools.filepicker.dialogs.FilePickerDialog
|
||||
import kotlinx.android.synthetic.main.copy_item.view.*
|
||||
import java.io.File
|
||||
|
||||
class CopyDialog(val activity: Activity, val files: List<File>, val path: String, val copyListener: CopyTask.CopyListener, val listener: OnCopyListener) {
|
||||
class CopyDialog(val activity: Activity, val files: List<File>, val copyListener: CopyTask.CopyListener, val listener: OnCopyListener) {
|
||||
|
||||
init {
|
||||
val context = activity
|
||||
val view = LayoutInflater.from(context).inflate(R.layout.copy_item, null)
|
||||
val path = files[0].parent
|
||||
view.source.text = "${path.trimEnd('/')}/"
|
||||
|
||||
view.destination.setOnClickListener {
|
||||
|
Loading…
x
Reference in New Issue
Block a user