update commons, kotlin, gradle

This commit is contained in:
tibbi
2017-06-14 23:10:46 +02:00
parent 401ab4f3e6
commit a65426499e
5 changed files with 9 additions and 9 deletions

View File

@ -81,6 +81,6 @@ class ChangeSortingDialog(val activity: SimpleActivity, val path: String = "", v
config.removeFolderSorting(path)
config.sorting = sorting
}
callback.invoke()
callback()
}
}

View File

@ -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()
}
}

View File

@ -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)
}
}
}