update commons to 5.0.16
This commit is contained in:
parent
2cceb6b658
commit
19d9f20b89
4 changed files with 8 additions and 7 deletions
|
@ -42,7 +42,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.0.2'
|
||||
implementation 'com.simplemobiletools:commons:5.0.16'
|
||||
|
||||
implementation files('../libs/RootTools.jar')
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
|
||||
override fun getIsItemSelectable(position: Int) = true
|
||||
|
||||
override fun getItemSelectionKey(position: Int) = fileDirItems[position].path
|
||||
override fun getItemSelectionKey(position: Int) = fileDirItems.getOrNull(position)?.path
|
||||
|
||||
override fun getItemKeyPosition(key: String) = fileDirItems.indexOfFirst { it.path == key }
|
||||
|
||||
|
@ -108,7 +108,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
override fun onBindViewHolder(holder: MyRecyclerViewAdapter.ViewHolder, position: Int) {
|
||||
val fileDirItem = fileDirItems[position]
|
||||
holder.bindView(fileDirItem, true, true) { itemView, layoutPosition ->
|
||||
setupView(itemView, fileDirItem, isKeySelected(fileDirItem.path))
|
||||
setupView(itemView, fileDirItem)
|
||||
}
|
||||
bindViewHolder(holder)
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
}
|
||||
|
||||
private fun displayRenameDialog() {
|
||||
val oldPath = getSelectedFileDirItems()[0].path
|
||||
val oldPath = getFirstSelectedItemPath()
|
||||
RenameItemDialog(activity, oldPath) {
|
||||
activity.config.moveFavorite(oldPath, it)
|
||||
activity.runOnUiThread {
|
||||
|
@ -544,7 +544,8 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupView(view: View, fileDirItem: FileDirItem, isSelected: Boolean) {
|
||||
private fun setupView(view: View, fileDirItem: FileDirItem) {
|
||||
val isSelected = isKeySelected(fileDirItem.path)
|
||||
view.apply {
|
||||
item_frame.isSelected = isSelected
|
||||
val fileName = fileDirItem.name
|
||||
|
|
|
@ -33,7 +33,7 @@ class ManageFavoritesAdapter(activity: BaseSimpleActivity, var favorites: ArrayL
|
|||
|
||||
override fun getIsItemSelectable(position: Int) = true
|
||||
|
||||
override fun getItemSelectionKey(position: Int) = favorites[position]
|
||||
override fun getItemSelectionKey(position: Int) = favorites.getOrNull(position)
|
||||
|
||||
override fun getItemKeyPosition(key: String) = favorites.indexOfFirst { it == key }
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.0'
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in a new issue