mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 11:56:09 -06:00
Fix no expandable grades (#184)
This commit is contained in:
parent
9f04dbf60f
commit
c2b8f85ad9
@ -81,11 +81,12 @@ class GradeDetailsFragment : BaseFragment(), GradeDetailsView, GradeView.GradeCh
|
||||
gradeDetailsAdapter.clear()
|
||||
}
|
||||
|
||||
override fun resetView() {
|
||||
gradeDetailsAdapter.apply {
|
||||
smoothScrollToPosition(0)
|
||||
collapseAll()
|
||||
}
|
||||
override fun collapseAllItems() {
|
||||
gradeDetailsAdapter.collapseAll()
|
||||
}
|
||||
|
||||
override fun scrollToStart() {
|
||||
gradeDetailsAdapter.smoothScrollToPosition(0)
|
||||
}
|
||||
|
||||
override fun getHeaderOfItem(item: AbstractFlexibleItem<*>): IExpandable<*, out IFlexible<*>>? {
|
||||
|
@ -80,7 +80,10 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
|
||||
fun onParentViewReselected() {
|
||||
view?.run {
|
||||
if (!isViewEmpty) resetView()
|
||||
if (!isViewEmpty) {
|
||||
if (preferencesRepository.isGradeExpandable) collapseAllItems()
|
||||
scrollToStart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,10 +22,12 @@ interface GradeDetailsView : BaseView {
|
||||
|
||||
fun updateItem(item: AbstractFlexibleItem<*>)
|
||||
|
||||
fun resetView()
|
||||
|
||||
fun clearView()
|
||||
|
||||
fun scrollToStart()
|
||||
|
||||
fun collapseAllItems()
|
||||
|
||||
fun showGradeDialog(grade: Grade)
|
||||
|
||||
fun showContent(show: Boolean)
|
||||
|
Loading…
Reference in New Issue
Block a user