Enable sharing to stories and refactor share activity.

This commit is contained in:
Alex Hart
2022-04-07 15:47:56 -03:00
committed by Greyson Parrelli
parent fd4543ffe0
commit 523537cf05
62 changed files with 1188 additions and 1855 deletions

View File

@@ -47,16 +47,16 @@ class ContactSearchPagedDataSourceTest {
val expected = listOf(
ContactSearchKey.Header(ContactSearchConfiguration.SectionKey.RECENTS),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.Header(ContactSearchConfiguration.SectionKey.INDIVIDUALS)
)
@@ -71,15 +71,15 @@ class ContactSearchPagedDataSourceTest {
val result = testSubject.load(5, 10) { false }
val expected = listOf(
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.Header(ContactSearchConfiguration.SectionKey.INDIVIDUALS),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.KnownRecipient(RecipientId.UNKNOWN),
ContactSearchKey.Expand(ContactSearchConfiguration.SectionKey.INDIVIDUALS)
)
@@ -95,17 +95,17 @@ class ContactSearchPagedDataSourceTest {
val expected = listOf(
ContactSearchKey.Header(ContactSearchConfiguration.SectionKey.STORIES),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
ContactSearchKey.RecipientSearchKey.Story(RecipientId.UNKNOWN),
)
val resultKeys = result.map { it.contactSearchKey }