Inline the stories flag.

This commit is contained in:
Alex Hart
2022-11-08 15:50:20 -04:00
committed by Cody Henthorne
parent b55954380d
commit 2b685ea89f
11 changed files with 14 additions and 105 deletions

View File

@@ -86,7 +86,6 @@ import org.thoughtcrime.securesms.recipients.RecipientId
import org.thoughtcrime.securesms.storage.StorageRecordUpdate
import org.thoughtcrime.securesms.storage.StorageSyncHelper
import org.thoughtcrime.securesms.storage.StorageSyncModels
import org.thoughtcrime.securesms.stories.Stories.isFeatureFlagEnabled
import org.thoughtcrime.securesms.util.Base64
import org.thoughtcrime.securesms.util.FeatureFlags
import org.thoughtcrime.securesms.util.GroupUtil
@@ -1163,11 +1162,8 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
* @return All storage IDs for synced records, excluding the ones that need to be deleted.
*/
fun getContactStorageSyncIdsMap(): Map<RecipientId, StorageId> {
val (inPart, args) = if (isFeatureFlagEnabled()) {
"(?, ?)" to SqlUtil.buildArgs(GroupType.NONE.id, Recipient.self().id, GroupType.SIGNAL_V1.id, GroupType.DISTRIBUTION_LIST.id)
} else {
"(?)" to SqlUtil.buildArgs(GroupType.NONE.id, Recipient.self().id, GroupType.SIGNAL_V1.id)
}
val inPart = "(?, ?)"
val args = SqlUtil.buildArgs(GroupType.NONE.id, Recipient.self().id, GroupType.SIGNAL_V1.id, GroupType.DISTRIBUTION_LIST.id)
val query = """
$STORAGE_SERVICE_ID NOT NULL AND (