Include call link count when determining total content count of calls tab.

This commit is contained in:
Alex Hart
2024-11-12 10:24:48 -04:00
committed by Greyson Parrelli
parent 58d9127ae4
commit 6053c4aac5

View File

@@ -42,7 +42,7 @@ class CallLogViewModel(
val isEmpty: Boolean get() = _isEmpty.value ?: false
val totalCount: Flowable<Int> = Flowable.combineLatest(distinctQueryFilterPairs, data) { a, _ -> a }
.map { (query, filter) -> callLogRepository.getCallsCount(query, filter) }
.map { (query, filter) -> callLogRepository.getCallsCount(query, filter) + callLogRepository.getCallLinksCount(query, filter) }
.doOnNext { _isEmpty.onNext(it <= 0) }
val selectionStateSnapshot: CallLogSelectionState