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
|
# 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
|
- [ ] 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
|
- [ ] Add alerts for replies to posts the user liked
|
||||||
- [ ] Stack views so scroll position isn't lost on navigation
|
- [ ] Stack views so scroll position isn't lost on navigation
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
import relay, {user} from 'src/relay'
|
import relay, {user} from 'src/relay'
|
||||||
|
|
||||||
export let note
|
export let note
|
||||||
|
export let until = Infinity
|
||||||
export let depth = 0
|
export let depth = 0
|
||||||
export let anchorId = null
|
export let anchorId = null
|
||||||
export let showParent = true
|
export let showParent = true
|
||||||
@ -181,7 +182,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#each note.replies as r (r.id)}
|
{#each note.replies as r (r.id)}
|
||||||
|
{#if r.created_at < until}
|
||||||
<svelte:self showParent={false} note={r} depth={depth - 1} {invertColors} {anchorId} />
|
<svelte:self showParent={false} note={r} depth={depth - 1} {invertColors} {anchorId} />
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let depth = 2
|
||||||
let until = now()
|
let until = now()
|
||||||
let newNotes = []
|
let newNotes = []
|
||||||
let newNotesLength = 0
|
let newNotesLength = 0
|
||||||
@ -46,8 +47,8 @@
|
|||||||
Load {quantify(newNotesLength, 'new note')}
|
Load {quantify(newNotesLength, 'new note')}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#each visibleNotes as n (n.id)}
|
{#each visibleNotes as note (note.id)}
|
||||||
<li><Note note={n} depth={2} /></li>
|
<li><Note {until} {note} {depth} /></li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user