simplify the copydialog constructor

This commit is contained in:
tibbi
2016-11-08 22:00:42 +01:00
parent e87b6553a1
commit 3ce7d682b6
2 changed files with 3 additions and 2 deletions

View File

@ -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 {