mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
Revert "RoomSummaryController: Remove deprecated usage of ScSdkPreferences"
This reverts commit 777f349f82
.
This commit is contained in:
parent
9425640277
commit
4ef447d739
1 changed files with 4 additions and 2 deletions
|
@ -23,6 +23,7 @@ import im.vector.app.core.epoxy.helpFooterItem
|
|||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.core.resources.UserPreferencesProvider
|
||||
import im.vector.app.features.home.RoomListDisplayMode
|
||||
import im.vector.app.features.home.room.ScSdkPreferences
|
||||
import im.vector.app.features.home.room.filtered.FilteredRoomFooterItem
|
||||
import im.vector.app.features.home.room.filtered.filteredRoomFooterItem
|
||||
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
|
||||
|
@ -34,7 +35,8 @@ import javax.inject.Inject
|
|||
class RoomSummaryController @Inject constructor(private val stringProvider: StringProvider,
|
||||
private val roomSummaryItemFactory: RoomSummaryItemFactory,
|
||||
private val roomListNameFilter: RoomListNameFilter,
|
||||
private val userPreferencesProvider: UserPreferencesProvider
|
||||
private val userPreferencesProvider: UserPreferencesProvider,
|
||||
private val scSdkPreferences: ScSdkPreferences
|
||||
) : EpoxyController() {
|
||||
|
||||
var listener: Listener? = null
|
||||
|
@ -139,7 +141,7 @@ class RoomSummaryController @Inject constructor(private val stringProvider: Stri
|
|||
0
|
||||
} else {
|
||||
// TODO actual sum of events instead of sum of chats?
|
||||
summaries.map { it.hasUnreadMessages }.sumBy { b -> if (b) 1 else 0 }
|
||||
summaries.map { it.scHasUnreadMessages(scSdkPreferences) }.sumBy { b -> if (b) 1 else 0 }
|
||||
}
|
||||
val showHighlighted = summaries.any { it.highlightCount > 0 }
|
||||
roomCategoryItem {
|
||||
|
|
Loading…
Reference in a new issue