mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
update commons, kotlin, gradle
This commit is contained in:
@ -81,6 +81,6 @@ class ChangeSortingDialog(val activity: SimpleActivity, val path: String = "", v
|
||||
config.removeFolderSorting(path)
|
||||
config.sorting = sorting
|
||||
}
|
||||
callback.invoke()
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback
|
||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
|
||||
val name = view.item_name.value
|
||||
if (name.isEmpty()) {
|
||||
context.toast(R.string.empty_name)
|
||||
activity.toast(R.string.empty_name)
|
||||
} else if (name.isAValidFilename()) {
|
||||
val file = File(path, name)
|
||||
if (file.exists()) {
|
||||
context.toast(R.string.name_taken)
|
||||
activity.toast(R.string.name_taken)
|
||||
return@OnClickListener
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback
|
||||
}
|
||||
}
|
||||
} else {
|
||||
context.toast(R.string.invalid_name)
|
||||
activity.toast(R.string.invalid_name)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -84,6 +84,6 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback
|
||||
|
||||
private fun success(alertDialog: AlertDialog) {
|
||||
alertDialog.dismiss()
|
||||
callback.invoke()
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
|
||||
startActivity(this)
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
if (!tryGenericMimeType(this, mimeType!!, file)) {
|
||||
context.toast(R.string.no_app_found)
|
||||
activity.toast(R.string.no_app_found)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user