Fixed call logs details duplicated each time they are displayed

This commit is contained in:
Sylvain Berfini 2023-08-07 16:03:15 +02:00
parent 839efbdb7c
commit f1cfa57f42

View file

@ -53,7 +53,9 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
viewModel = callLogGroup.lastCallLogViewModel
binding.viewModel = viewModel
viewModel.addRelatedCallLogs(callLogGroup.callLogs)
if (viewModel.relatedCallLogs.value.orEmpty().isEmpty()) {
viewModel.addRelatedCallLogs(callLogGroup.callLogs)
}
useMaterialSharedAxisXForwardAnimation = sharedViewModel.isSlidingPaneSlideable.value == false