Revert "Do not remove onboarding story when disabling stories."

This reverts commit 8c76cead58.
This commit is contained in:
Alex Hart
2022-10-13 09:17:34 -03:00
parent a04c2c30b9
commit 2bbce6ad47
4 changed files with 4 additions and 29 deletions

View File

@@ -198,7 +198,6 @@ public abstract class MessageDatabase extends Database implements MmsSmsColumns,
public abstract boolean isStory(long messageId);
public abstract @NonNull Reader getOutgoingStoriesTo(@NonNull RecipientId recipientId);
public abstract @NonNull Reader getAllOutgoingStories(boolean reverse, int limit);
public abstract @NonNull Reader getAllIncomingStoriesExceptOnboarding();
public abstract @NonNull Reader getAllOutgoingStoriesAt(long sentTimestamp);
public abstract @NonNull List<StoryResult> getOrderedStoryRecipientsAndIds(boolean isOutgoingOnly);
public abstract @NonNull Reader getAllStoriesFor(@NonNull RecipientId recipientId, int limit);

View File

@@ -635,17 +635,6 @@ public class MmsDatabase extends MessageDatabase {
return new Reader(rawQuery(where, null, reverse, limit));
}
@Override
public @NonNull MessageDatabase.Reader getAllIncomingStoriesExceptOnboarding() {
RecipientId onboardingRecipientId = SignalStore.releaseChannelValues().getReleaseChannelRecipientId();
String where = IS_STORY_CLAUSE + " AND NOT (" + getOutgoingTypeClause() + ")";
if (onboardingRecipientId != null) {
where += " AND " + RECIPIENT_ID + " != " + onboardingRecipientId.serialize();
}
return new Reader(rawQuery(where, null, false, -1L));
}
@Override
public @NonNull MessageDatabase.Reader getAllOutgoingStoriesAt(long sentTimestamp) {
String where = IS_STORY_CLAUSE + " AND " + DATE_SENT + " = ? AND (" + getOutgoingTypeClause() + ")";

View File

@@ -1448,11 +1448,6 @@ public class SmsDatabase extends MessageDatabase {
throw new UnsupportedOperationException();
}
@Override
public @NonNull MessageDatabase.Reader getAllIncomingStoriesExceptOnboarding() {
throw new UnsupportedOperationException();
}
@Override
public @NonNull MessageDatabase.Reader getAllOutgoingStoriesAt(long sentTimestamp) {
throw new UnsupportedOperationException();