From 5e765bf1cb29d30d627552da84d02594f506af1f Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 29 Aug 2023 22:56:13 -0700 Subject: Rework web onboarding --- src/state/models/feeds/custom-feed.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/state/models/feeds/custom-feed.ts') diff --git a/src/state/models/feeds/custom-feed.ts b/src/state/models/feeds/custom-feed.ts index 3c6d52755..2de4534e7 100644 --- a/src/state/models/feeds/custom-feed.ts +++ b/src/state/models/feeds/custom-feed.ts @@ -67,6 +67,19 @@ export class CustomFeedModel { } } + async pin() { + try { + await this.rootStore.preferences.addPinnedFeed(this.uri) + } catch (error) { + this.rootStore.log.error('Failed to pin feed', error) + } finally { + track('CustomFeed:Pin', { + name: this.data.displayName, + uri: this.uri, + }) + } + } + async unsave() { try { await this.rootStore.preferences.removeSavedFeed(this.uri) -- cgit 1.4.1