Download your own story attachments. Hydrate story replies on receive
This commit is contained in:
parent
269d170275
commit
5b6874b882
2 changed files with 12 additions and 1 deletions
|
@ -4,12 +4,18 @@
|
|||
import type { ConversationAttributesType } from '../model-types.d';
|
||||
|
||||
import dataInterface from '../sql/Client';
|
||||
import { isMe } from './whatTypeOfConversation';
|
||||
|
||||
const MAX_NUM_STORIES_TO_PREFETCH = 5;
|
||||
|
||||
export async function shouldDownloadStory(
|
||||
conversation: ConversationAttributesType
|
||||
): Promise<boolean> {
|
||||
if (isMe(conversation)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// We download the first time the user has posted a story
|
||||
if (!conversation.hasPostedStory) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue