Refactor misleading "default"

This used to be the default, but was changed upstream to default
to something similar to our UNREAD_KIND_CONTENT.

Change-Id: Id0e46eebcd3505071f200cafd603fb9828c9a919
This commit is contained in:
SpiritCroc 2020-12-28 16:25:19 +01:00
parent 0c37405278
commit cfbe6c753a
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ data class RoomSummary constructor(
return when(preferenceProvider.getUnreadKind(isDirect)) {
UNREAD_KIND_ORIGINAL_CONTENT -> hasUnreadOriginalContentMessages
UNREAD_KIND_CONTENT -> hasUnreadContentMessages
// UNREAD_KIND_DEFAULT
// UNREAD_KIND_FULL
else -> hasUnreadMessages
}
}
@ -112,7 +112,7 @@ data class RoomSummary constructor(
companion object {
const val NOT_IN_BREADCRUMBS = -1
// SC addition
const val UNREAD_KIND_DEFAULT = 0
const val UNREAD_KIND_FULL = 0
const val UNREAD_KIND_CONTENT = 1
const val UNREAD_KIND_ORIGINAL_CONTENT = 2
}

View File

@ -10,6 +10,6 @@ class ScSdkPreferences @Inject constructor(private val vectorPreferences: Vector
constructor(context: Context?) : this(vectorPreferences = context?.let { VectorPreferences(it) })
override fun getUnreadKind(isDirect: Boolean): Int {
return vectorPreferences?.roomUnreadKind(isDirect) ?: RoomSummary.UNREAD_KIND_DEFAULT
return vectorPreferences?.roomUnreadKind(isDirect) ?: RoomSummary.UNREAD_KIND_FULL
}
}