From 5b48d7346d73f2eb4de1ea76b93666604e31c0e8 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Thu, 31 Aug 2023 12:46:34 +0200 Subject: [PATCH] Select Nostr highlights as default guest feed --- src/constants.ts | 2 ++ src/contexts/SettingsContext.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 6ff85a9..fd84934 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,6 +17,8 @@ export const emptyPage: FeedPage = { noteActions: {}, } +export const nostrHighlights ='9a500dccc084a138330a1d1b2be0d5e86394624325d25084d3eca164e7ea698a'; + export const trendingFeed = { name: 'Trending, my network', hex: 'network;trending', diff --git a/src/contexts/SettingsContext.tsx b/src/contexts/SettingsContext.tsx index 545522b..15f8147 100644 --- a/src/contexts/SettingsContext.tsx +++ b/src/contexts/SettingsContext.tsx @@ -1,6 +1,6 @@ import { createStore } from "solid-js/store"; import { useToastContext } from "../components/Toaster/Toaster"; -import { contentScope, defaultContentModeration, defaultFeeds, defaultNotificationSettings, defaultZapAmount, defaultZapOptions, themes, trendingFeed, trendingScope } from "../constants"; +import { contentScope, defaultContentModeration, defaultFeeds, defaultNotificationSettings, defaultZapAmount, defaultZapOptions, nostrHighlights, themes, trendingFeed, trendingScope } from "../constants"; import { createContext, createEffect, @@ -294,7 +294,7 @@ export const SettingsProvider = (props: { children: ContextChildren }) => { () => replaceAvailableFeeds(account?.publicKey, feeds), ); - updateStore('defaultFeed', () => store.availableFeeds[0]); + updateStore('defaultFeed', () => store.availableFeeds.find(x => x.hex === nostrHighlights) || store.availableFeeds[0]); updateStore('notificationSettings', () => ({ ...notificationSettings } || { ...defaultNotificationSettings })); updateStore('applyContentModeration', () => true);