speed up the fastscroller hint text fetching too

This commit is contained in:
tibbi 2020-04-23 21:35:49 +02:00
parent d55dc217c9
commit f1f50678ae
3 changed files with 8 additions and 4 deletions

View file

@ -58,7 +58,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.26.23'
implementation 'com.simplemobiletools:commons:5.26.24'
implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6'
implementation 'com.alexvasilkov:gesture-views:2.5.2'

View file

@ -720,7 +720,11 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
val itemToLoad = getImagePathToLoad(listItem.path)
if (!activity.isDestroyed) {
Glide.with(activity).load(itemToLoad).transition(DrawableTransitionOptions.withCrossFade()).apply(options).into(item_icon)
Glide.with(activity)
.load(itemToLoad)
.transition(DrawableTransitionOptions.withCrossFade())
.apply(options)
.into(item_icon)
}
}
}

View file

@ -175,7 +175,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
items_fastscroller.allowBubbleDisplay = true
items_fastscroller.setViews(items_list, mView.items_swipe_refresh) {
items_fastscroller.updateBubbleText(storedItems.getOrNull(it)?.getBubbleText(context) ?: "")
items_fastscroller.updateBubbleText(storedItems.getOrNull(it)?.getBubbleText(context, storedDateFormat, storedTimeFormat) ?: "")
}
getRecyclerLayoutManager().onRestoreInstanceState(scrollStates[currentPath])
@ -186,7 +186,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
}
}
fun getScrollState() = getRecyclerLayoutManager().onSaveInstanceState()
private fun getScrollState() = getRecyclerLayoutManager().onSaveInstanceState()
private fun getRecyclerLayoutManager() = (mView.items_list.layoutManager as MyLinearLayoutManager)