Updated module sections so it looks more consistent

This commit is contained in:
Viktor De Pasquale
2019-11-11 19:36:40 +01:00
parent 82120cf47f
commit 495e734428
5 changed files with 40 additions and 99 deletions
@@ -88,6 +88,8 @@ class SectionTitle(
) : ComparableRvItem<SectionTitle>() {
override val layoutRes = R.layout.item_section_md2
val hasButton = KObservableField(button != 0 || icon != 0)
override fun onBindingBound(binding: ViewDataBinding) {
super.onBindingBound(binding)
val params = binding.root.layoutParams as StaggeredGridLayoutManager.LayoutParams
@@ -136,7 +138,7 @@ class ModuleItem(val item: Module) : ObservableItem<ModuleItem>(), Observable {
fun delete(viewModel: ModuleViewModel) {
isRemoved = !isRemoved
viewModel.moveToState(this)
viewModel.moveToState()
}
override fun contentSameAs(other: ModuleItem): Boolean = item.version == other.item.version