UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

14 lines (11 loc) 430 B
import { pullFromCache, pushToCache } from '~/cache/api'; export const addFlagSubChannelUnreadBySubChannelId = (subChannelId: string) => { const cacheKey = ['subChannelUnreadInfo', 'get', subChannelId]; const cachedSubChannelUnread = pullFromCache<Amity.SubChannelUnreadInfo>(cacheKey)?.data; if (cachedSubChannelUnread) { pushToCache(cacheKey, { ...cachedSubChannelUnread, isDeleted: true, }); } };