Introduce an image sizes cache to improve feed layouts (close #213) (#335)

* Introduce an image sizes cache to improve feed layouts (close #213)

* Clear out resolved promises from the image cache
This commit is contained in:
Paul Frazee 2023-03-21 12:59:10 -05:00 committed by GitHub
parent c1d454b7cf
commit 858d4c8c88
7 changed files with 92 additions and 30 deletions

View file

@ -13,10 +13,11 @@ import {LogModel} from './log'
import {SessionModel} from './session'
import {ShellUiModel} from './ui/shell'
import {ProfilesViewModel} from './profiles-view'
import {LinkMetasViewModel} from './link-metas-view'
import {LinkMetasCache} from './cache/link-metas'
import {NotificationsViewItemModel} from './notifications-view'
import {MeModel} from './me'
import {resetToTab} from '../../Navigation'
import {ImageSizesCache} from './cache/image-sizes'
export const appInfo = z.object({
build: z.string(),
@ -34,7 +35,8 @@ export class RootStoreModel {
shell = new ShellUiModel(this)
me = new MeModel(this)
profiles = new ProfilesViewModel(this)
linkMetas = new LinkMetasViewModel(this)
linkMetas = new LinkMetasCache(this)
imageSizes = new ImageSizesCache()
// HACK
// this flag is to track the lexicon breaking refactor