mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Prevent crash if for some reason today is not found
This commit is contained in:
parent
dd7546484b
commit
0f59e1a381
1 changed files with 7 additions and 5 deletions
|
|
@ -303,11 +303,13 @@ class MeetingsListFragment : AbstractMainFragment() {
|
|||
}
|
||||
val index = listViewModel.meetings.value.orEmpty().indexOf(todayMeeting)
|
||||
Log.i("$TAG 'Today' is at position [$index]")
|
||||
binding.meetingsList.smoothScrollToPosition(index) // Workaround to have header decoration visible at top
|
||||
(binding.meetingsList.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
||||
index,
|
||||
AppUtils.getDimension(R.dimen.meeting_list_decoration_height).toInt()
|
||||
)
|
||||
if (index > 0) {
|
||||
binding.meetingsList.smoothScrollToPosition(index) // Workaround to have header decoration visible at top
|
||||
(binding.meetingsList.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
||||
index,
|
||||
AppUtils.getDimension(R.dimen.meeting_list_decoration_height).toInt()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showCancelMeetingDialog(meetingModel: MeetingModel) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue