feat: add support for commenting and reacting on external content
This commit is contained in:
parent
5ba5c26fcd
commit
0bb62dd3fb
76 changed files with 1635 additions and 639 deletions
|
|
@ -19,7 +19,7 @@ import client from '@/services/client.service'
|
|||
import customEmojiService from '@/services/custom-emoji.service'
|
||||
import indexedDb from '@/services/indexed-db.service'
|
||||
import storage from '@/services/local-storage.service'
|
||||
import noteStatsService from '@/services/note-stats.service'
|
||||
import stuffStatsService from '@/services/stuff-stats.service'
|
||||
import {
|
||||
ISigner,
|
||||
TAccount,
|
||||
|
|
@ -369,7 +369,7 @@ export function NostrProvider({ children }: { children: React.ReactNode }) {
|
|||
limit: 100
|
||||
}
|
||||
])
|
||||
noteStatsService.updateNoteStatsByEvents(events)
|
||||
stuffStatsService.updateStuffStatsByEvents(events)
|
||||
}
|
||||
initInteractions()
|
||||
}, [account])
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getEventKey, getEventKeyFromTag, getParentTag } from '@/lib/event'
|
||||
import { getEventKey, getKeyFromTag, getParentTag } from '@/lib/event'
|
||||
import { Event } from 'nostr-tools'
|
||||
import { createContext, useCallback, useContext, useState } from 'react'
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ export function ReplyProvider({ children }: { children: React.ReactNode }) {
|
|||
|
||||
const parentTag = getParentTag(reply)
|
||||
if (parentTag) {
|
||||
const parentKey = getEventKeyFromTag(parentTag.tag)
|
||||
const parentKey = getKeyFromTag(parentTag.tag)
|
||||
if (parentKey) {
|
||||
newReplyEventMap.set(parentKey, [...(newReplyEventMap.get(parentKey) || []), reply])
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { TTheme, TThemeSetting } from '@/types'
|
|||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
|
||||
type ThemeProviderState = {
|
||||
theme: TTheme
|
||||
themeSetting: TThemeSetting
|
||||
setThemeSetting: (themeSetting: TThemeSetting) => void
|
||||
primaryColor: TPrimaryColor
|
||||
|
|
@ -83,6 +84,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|||
return (
|
||||
<ThemeProviderContext.Provider
|
||||
value={{
|
||||
theme,
|
||||
themeSetting,
|
||||
setThemeSetting: updateThemeSetting,
|
||||
primaryColor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue