mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Do not remove onboarding story when disabling stories.
This commit is contained in:
committed by
Greyson Parrelli
parent
da3623d7e6
commit
8c76cead58
@@ -198,6 +198,7 @@ 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);
|
||||
|
||||
@@ -635,6 +635,17 @@ 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() + ")";
|
||||
|
||||
@@ -1448,6 +1448,11 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user