Select Nostr highlights as default guest feed

This commit is contained in:
Bojan Mojsilovic 2023-08-31 12:46:34 +02:00
parent 5e96da736e
commit 5b48d7346d
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,8 @@ export const emptyPage: FeedPage = {
noteActions: {},
}
export const nostrHighlights ='9a500dccc084a138330a1d1b2be0d5e86394624325d25084d3eca164e7ea698a';
export const trendingFeed = {
name: 'Trending, my network',
hex: 'network;trending',

View File

@ -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);