Add graph query optimization for faster social graph operations
- Add GraphQueryService for NIP-XX graph queries - Add GraphCacheService for IndexedDB caching of results - Optimize FollowedBy component with graph queries - Add graph query support to ThreadService - Add useFetchFollowGraph hook - Add graph query toggle in Settings > System - Bump version to v0.4.0 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -254,6 +254,7 @@ export default function Settings() {
|
||||
|
||||
// System settings
|
||||
const [filterOutOnionRelays, setFilterOutOnionRelays] = useState(storage.getFilterOutOnionRelays())
|
||||
const [graphQueriesEnabled, setGraphQueriesEnabled] = useState(storage.getGraphQueriesEnabled())
|
||||
|
||||
// Messaging settings
|
||||
const [preferNip44, setPreferNip44] = useState(storage.getPreferNip44())
|
||||
@@ -738,6 +739,25 @@ export default function Settings() {
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
<SettingItem>
|
||||
<div>
|
||||
<Label htmlFor="graph-queries-enabled" className="text-base font-normal">
|
||||
{t('Graph query optimization')}
|
||||
</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{t('Use graph queries for faster follow/thread loading on supported relays')}
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
id="graph-queries-enabled"
|
||||
checked={graphQueriesEnabled}
|
||||
onCheckedChange={(checked) => {
|
||||
storage.setGraphQueriesEnabled(checked)
|
||||
setGraphQueriesEnabled(checked)
|
||||
dispatchSettingsChanged()
|
||||
}}
|
||||
/>
|
||||
</SettingItem>
|
||||
</AccordionContent>
|
||||
</AccordionItem>
|
||||
</NavigableAccordionItem>
|
||||
|
||||
Reference in New Issue
Block a user