mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 04:33:36 +00:00
Reduce number of db calls to getGroup.
This commit is contained in:
@@ -84,7 +84,8 @@ object RecipientDatabaseTestUtils {
|
||||
extras: Recipient.Extras? = null,
|
||||
hasGroupsInCommon: Boolean = false,
|
||||
badges: List<Badge> = emptyList(),
|
||||
isReleaseChannel: Boolean = false
|
||||
isReleaseChannel: Boolean = false,
|
||||
isActive: Boolean = true
|
||||
): Recipient = Recipient(
|
||||
recipientId,
|
||||
RecipientDetails(
|
||||
@@ -155,7 +156,8 @@ object RecipientDatabaseTestUtils {
|
||||
isHidden = false
|
||||
),
|
||||
participants,
|
||||
isReleaseChannel
|
||||
isReleaseChannel,
|
||||
isActive
|
||||
),
|
||||
resolved
|
||||
)
|
||||
|
||||
@@ -104,7 +104,7 @@ class GroupsV2StateProcessorTest {
|
||||
val data = givenData(init)
|
||||
|
||||
every { groupTable.getGroup(any<GroupId.V2>()) } returns data.groupRecord
|
||||
every { groupTable.isUnknownGroup(any()) } returns !data.groupRecord.isPresent
|
||||
every { groupTable.isUnknownGroup(any<GroupId>()) } returns !data.groupRecord.isPresent
|
||||
|
||||
data.serverState?.let { serverState ->
|
||||
val testPartial = object : PartialDecryptedGroup(null, serverState, null, null) {
|
||||
@@ -305,7 +305,7 @@ class GroupsV2StateProcessorTest {
|
||||
apiCallParameters(2, true)
|
||||
}
|
||||
|
||||
every { groupTable.isUnknownGroup(any()) } returns true
|
||||
every { groupTable.isUnknownGroup(any<GroupId>()) } returns true
|
||||
|
||||
val result = processor.updateLocalGroupToRevision(2, 0, DecryptedGroupChange.getDefaultInstance())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user