Updated install from storage button to be more expressive

This commit is contained in:
Viktor De Pasquale
2019-11-18 17:49:03 +01:00
parent 332c1a6c59
commit 833269fd0a
5 changed files with 33 additions and 7 deletions

View File

@@ -84,6 +84,12 @@ class RepoRvItem(val item: Repo) : ComparableRvItem<RepoRvItem>() {
object InstallModule : ComparableRvItem<InstallModule>() {
override val layoutRes = R.layout.item_module_download
override fun onBindingBound(binding: ViewDataBinding) {
super.onBindingBound(binding)
val params = binding.root.layoutParams as? StaggeredGridLayoutManager.LayoutParams
params?.isFullSpan = true
}
override fun contentSameAs(other: InstallModule) = this == other
override fun itemSameAs(other: InstallModule) = this === other
}
@@ -116,8 +122,8 @@ class SectionTitle(
override fun onBindingBound(binding: ViewDataBinding) {
super.onBindingBound(binding)
val params = binding.root.layoutParams as StaggeredGridLayoutManager.LayoutParams
params.isFullSpan = true
val params = binding.root.layoutParams as? StaggeredGridLayoutManager.LayoutParams
params?.isFullSpan = true
}
override fun itemSameAs(other: SectionTitle): Boolean = this === other