diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-03 09:44:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 09:44:43 -0700 |
commit | a63f97aef2ea70ff9f1b81d40073f36ae8e88278 (patch) | |
tree | bf93006d20d099b3dc80861e68a4bd1f53d2a097 /src/state/models/root-store.ts | |
parent | 7256169506332c7935ced4e0babcbd07159b9402 (diff) | |
download | voidsky-a63f97aef2ea70ff9f1b81d40073f36ae8e88278.tar.zst |
Use a post and handle-resolution cache to enable quick postthread loading (#1097)
* Use a post and handle-resolution cache to enable quick postthread loading * Fix positioning of thread when loaded from cache and give more visual cues * Include parent posts in cache * Include notifications in cache
Diffstat (limited to 'src/state/models/root-store.ts')
-rw-r--r-- | src/state/models/root-store.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index d76ea07c9..6ced8090a 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -12,7 +12,9 @@ import {isObj, hasProp} from 'lib/type-guards' import {LogModel} from './log' import {SessionModel} from './session' import {ShellUiModel} from './ui/shell' +import {HandleResolutionsCache} from './cache/handle-resolutions' import {ProfilesCache} from './cache/profiles-view' +import {PostsCache} from './cache/posts' import {LinkMetasCache} from './cache/link-metas' import {NotificationsFeedItemModel} from './feeds/notifications' import {MeModel} from './me' @@ -45,7 +47,9 @@ export class RootStoreModel { preferences = new PreferencesModel(this) me = new MeModel(this) invitedUsers = new InvitedUsers(this) + handleResolutions = new HandleResolutionsCache() profiles = new ProfilesCache(this) + posts = new PostsCache(this) linkMetas = new LinkMetasCache(this) imageSizes = new ImageSizesCache() mutedThreads = new MutedThreads() |