diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-29 22:56:13 -0700 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-08-29 22:56:13 -0700 |
commit | 5e765bf1cb29d30d627552da84d02594f506af1f (patch) | |
tree | 4620266dbd31e9ec525e173bb07652ff0b804ba7 /src/state/models/feeds/custom-feed.ts | |
parent | 5d9534ca7258e6165e537b89d999a8c494501dc0 (diff) | |
download | voidsky-5e765bf1cb29d30d627552da84d02594f506af1f.tar.zst |
Rework web onboarding
Diffstat (limited to 'src/state/models/feeds/custom-feed.ts')
-rw-r--r-- | src/state/models/feeds/custom-feed.ts | 13 |
1 files changed, 13 insertions, 0 deletions
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) |