Add support for new group story display states.

This commit is contained in:
Alex Hart
2022-09-22 13:21:53 -03:00
committed by Cody Henthorne
parent 8ca94eb3d5
commit c47a724654
16 changed files with 211 additions and 63 deletions

View File

@@ -239,10 +239,6 @@ class MediaSelectionRepository(context: Context) {
val recipient = Recipient.resolved(contact.recipientId)
val isStory = contact.isStory || recipient.isDistributionList
if (isStory && recipient.isActiveGroup && recipient.isGroup) {
SignalDatabase.groups.markDisplayAsStory(recipient.requireGroupId())
}
if (isStory && !recipient.isMyStory) {
SignalStore.storyValues().setLatestStorySend(StorySend.newSend(recipient))
}

View File

@@ -68,10 +68,6 @@ class TextStoryPostSendRepository {
val recipient = Recipient.resolved(contact.requireShareContact().recipientId.get())
val isStory = contact is ContactSearchKey.RecipientSearchKey.Story || recipient.isDistributionList
if (isStory && recipient.isActiveGroup && recipient.isGroup) {
SignalDatabase.groups.markDisplayAsStory(recipient.requireGroupId())
}
if (isStory && !recipient.isMyStory) {
SignalStore.storyValues().setLatestStorySend(StorySend.newSend(recipient))
}