mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Reduce feed reflow from new replies
This commit is contained in:
parent
7374b8f085
commit
06b357de1d
@ -28,6 +28,7 @@ If you like Coracle and want to support its development, you can donate sats via
|
||||
|
||||
# Bugs
|
||||
|
||||
- [ ] Reduce reflow on feeds from new stuff coming in
|
||||
- [ ] Follow fiatjaf's vision of clients being smart and connecting to recommended relays to fetch content
|
||||
- [ ] Add alerts for replies to posts the user liked
|
||||
- [ ] Stack views so scroll position isn't lost on navigation
|
||||
|
@ -17,6 +17,7 @@
|
||||
import relay, {user} from 'src/relay'
|
||||
|
||||
export let note
|
||||
export let until = Infinity
|
||||
export let depth = 0
|
||||
export let anchorId = null
|
||||
export let showParent = true
|
||||
@ -181,7 +182,9 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#each note.replies as r (r.id)}
|
||||
{#if r.created_at < until}
|
||||
<svelte:self showParent={false} note={r} depth={depth - 1} {invertColors} {anchorId} />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -22,6 +22,7 @@
|
||||
)
|
||||
})
|
||||
|
||||
let depth = 2
|
||||
let until = now()
|
||||
let newNotes = []
|
||||
let newNotesLength = 0
|
||||
@ -46,8 +47,8 @@
|
||||
Load {quantify(newNotesLength, 'new note')}
|
||||
</div>
|
||||
{/if}
|
||||
{#each visibleNotes as n (n.id)}
|
||||
<li><Note note={n} depth={2} /></li>
|
||||
{#each visibleNotes as note (note.id)}
|
||||
<li><Note {until} {note} {depth} /></li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user