From 73afe2caff3436aadbcbd26345905e3ead21413b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 31 Mar 2018 10:43:18 +0200 Subject: [PATCH] update commons to 3.17.16 --- app/build.gradle | 2 +- .../filemanager/activities/FavoritesActivity.kt | 1 - .../simplemobiletools/filemanager/activities/MainActivity.kt | 2 +- .../simplemobiletools/filemanager/adapters/ItemsAdapter.kt | 5 +++-- .../filemanager/adapters/ManageFavoritesAdapter.kt | 4 ++++ .../com/simplemobiletools/filemanager/extensions/Activity.kt | 1 + .../simplemobiletools/filemanager/fragments/ItemsFragment.kt | 1 - build.gradle | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0e86c812..1dbf1ce4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.13.8' + implementation 'com.simplemobiletools:commons:3.17.16' implementation files('../libs/RootTools.jar') diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/FavoritesActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/FavoritesActivity.kt index 51504384..91e85cf5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/FavoritesActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/FavoritesActivity.kt @@ -36,7 +36,6 @@ class FavoritesActivity : SimpleActivity(), RefreshRecyclerViewListener { } ManageFavoritesAdapter(this, favorites, this, manage_favorites_list) { }.apply { - setupDragListener(true) manage_favorites_list.adapter = this } } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt index 778726d3..1bee80e8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt @@ -271,7 +271,7 @@ class MainActivity : SimpleActivity() { FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons)) - startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_MULTISELECT or LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT, + startAboutActivity(R.string.app_name, LICENSE_MULTISELECT or LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT, BuildConfig.VERSION_NAME, faqItems) } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index 425fe68e..a40eb314 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -49,6 +49,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList) { + fun updateItems(newItems: ArrayList) { if (newItems.hashCode() != currentItemsHash) { currentItemsHash = newItems.hashCode() - fileDirItems = newItems + fileDirItems = newItems.clone() as ArrayList notifyDataSetChanged() finishActMode() } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ManageFavoritesAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ManageFavoritesAdapter.kt index 359b77d6..ca2cb1d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ManageFavoritesAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ManageFavoritesAdapter.kt @@ -16,6 +16,10 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL private val config = activity.config + init { + setupDragListener(true) + } + override fun getActionMenuId() = R.menu.cab_remove_only override fun prepareActionMode(menu: Menu) {} diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/extensions/Activity.kt index 1d6f3c38..d70592e7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/extensions/Activity.kt @@ -6,6 +6,7 @@ import android.net.Uri import android.support.v4.content.FileProvider import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.isNougatPlus import com.simplemobiletools.filemanager.BuildConfig import java.io.File import java.util.* diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt index 091f7664..1592aa21 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt @@ -150,7 +150,6 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb ItemsAdapter(activity as SimpleActivity, storedItems, this@ItemsFragment, items_list, isPickMultipleIntent, items_fastscroller) { itemClicked(it as FileDirItem) }.apply { - setupDragListener(true) addVerticalDividers(true) items_list.adapter = this } diff --git a/build.gradle b/build.gradle index 66c86d61..249f6d44 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong