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

@ -32,13 +32,13 @@ android {
} }
dependencies { dependencies {
compile 'com.simplemobiletools:commons:2.17.2' compile 'com.simplemobiletools:commons:2.20.1'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }
buildscript { buildscript {
ext.kotlin_version = '1.1.1' ext.kotlin_version = '1.1.2-5'
repositories { repositories {
mavenCentral() mavenCentral()
} }

View File

@ -81,6 +81,6 @@ class ChangeSortingDialog(val activity: SimpleActivity, val path: String = "", v
config.removeFolderSorting(path) config.removeFolderSorting(path)
config.sorting = sorting 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 { getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
val name = view.item_name.value val name = view.item_name.value
if (name.isEmpty()) { if (name.isEmpty()) {
context.toast(R.string.empty_name) activity.toast(R.string.empty_name)
} else if (name.isAValidFilename()) { } else if (name.isAValidFilename()) {
val file = File(path, name) val file = File(path, name)
if (file.exists()) { if (file.exists()) {
context.toast(R.string.name_taken) activity.toast(R.string.name_taken)
return@OnClickListener return@OnClickListener
} }
@ -41,7 +41,7 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback
} }
} }
} else { } 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) { private fun success(alertDialog: AlertDialog) {
alertDialog.dismiss() alertDialog.dismiss()
callback.invoke() callback()
} }
} }

View File

@ -171,7 +171,7 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
startActivity(this) startActivity(this)
} catch (e: ActivityNotFoundException) { } catch (e: ActivityNotFoundException) {
if (!tryGenericMimeType(this, mimeType!!, file)) { if (!tryGenericMimeType(this, mimeType!!, file)) {
context.toast(R.string.no_app_found) activity.toast(R.string.no_app_found)
} }
} }
} }

View File

@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.2' classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files