forked from github/wulkanowy-mirror
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()
|
gradeDetailsAdapter.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun resetView() {
|
override fun collapseAllItems() {
|
||||||
gradeDetailsAdapter.apply {
|
gradeDetailsAdapter.collapseAll()
|
||||||
smoothScrollToPosition(0)
|
}
|
||||||
collapseAll()
|
|
||||||
}
|
override fun scrollToStart() {
|
||||||
|
gradeDetailsAdapter.smoothScrollToPosition(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getHeaderOfItem(item: AbstractFlexibleItem<*>): IExpandable<*, out IFlexible<*>>? {
|
override fun getHeaderOfItem(item: AbstractFlexibleItem<*>): IExpandable<*, out IFlexible<*>>? {
|
||||||
|
@ -80,7 +80,10 @@ class GradeDetailsPresenter @Inject constructor(
|
|||||||
|
|
||||||
fun onParentViewReselected() {
|
fun onParentViewReselected() {
|
||||||
view?.run {
|
view?.run {
|
||||||
if (!isViewEmpty) resetView()
|
if (!isViewEmpty) {
|
||||||
|
if (preferencesRepository.isGradeExpandable) collapseAllItems()
|
||||||
|
scrollToStart()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,10 +22,12 @@ interface GradeDetailsView : BaseView {
|
|||||||
|
|
||||||
fun updateItem(item: AbstractFlexibleItem<*>)
|
fun updateItem(item: AbstractFlexibleItem<*>)
|
||||||
|
|
||||||
fun resetView()
|
|
||||||
|
|
||||||
fun clearView()
|
fun clearView()
|
||||||
|
|
||||||
|
fun scrollToStart()
|
||||||
|
|
||||||
|
fun collapseAllItems()
|
||||||
|
|
||||||
fun showGradeDialog(grade: Grade)
|
fun showGradeDialog(grade: Grade)
|
||||||
|
|
||||||
fun showContent(show: Boolean)
|
fun showContent(show: Boolean)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user