Skip to content

Watch: pre-cache favorite and frequently used stickers#2248

Open
Atlas20204 wants to merge 1 commit into
TelegramMessenger:masterfrom
Atlas20204:fix/watch-sticker-prefetch
Open

Watch: pre-cache favorite and frequently used stickers#2248
Atlas20204 wants to merge 1 commit into
TelegramMessenger:masterfrom
Atlas20204:fix/watch-sticker-prefetch

Conversation

@Atlas20204

Copy link
Copy Markdown

Stickers were downloaded on-demand only when visible and cancelled when scrolled off-screen, causing them to re-download every time the picker opened. This adds:

  • StickerPickerStore.prefetchStickers() that pre-downloads all favorite and recent sticker render files at priority 4 (highest)
  • Pinned file IDs protected from cancellation by cancelFileDownload()
  • TGBridgeStickersSignals.prefetchRecentStickersWithLimit: that triggers the full image download pipeline for recent stickers through TGFileCache
  • Re-enabled the in-memory caching layer for recent stickers in the legacy WatchKit extension
  • TGStickersController now calls prefetch after loading the sticker list

Stickers were downloaded on-demand only when visible and cancelled when
scrolled off-screen, causing them to re-download every time the picker
opened. This adds:

- StickerPickerStore.prefetchStickers() that pre-downloads all favorite
  and recent sticker render files at priority 4 (highest)
- Pinned file IDs protected from cancellation by cancelFileDownload()
- TGBridgeStickersSignals.prefetchRecentStickersWithLimit: that triggers
  the full image download pipeline for recent stickers through TGFileCache
- Re-enabled the in-memory caching layer for recent stickers in the legacy
  WatchKit extension
- TGStickersController now calls prefetch after loading the sticker list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant