Skip to content

Commit

Permalink
fix: cannot load correctly when init
Browse files Browse the repository at this point in the history
  • Loading branch information
Quorafind committed Jul 2, 2024
1 parent e3f8f93 commit c3ccfeb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/component/DailyNoteEditorView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
function startFillViewport() {
if (!intervalId) {
intervalId = setInterval(infiniteHandler, 100);
intervalId = setInterval(infiniteHandler, 1);
}
}
Expand Down Expand Up @@ -92,7 +92,7 @@
function sortDailyNotes(notes: TFile[]): TFile[] {
const fileFormat = getDailyNoteSettings().format || DEFAULT_DAILY_NOTE_FORMAT;
return notes.sort((a, b) => {
return moment(b.basename, fileFormat).valueOf() - moment(a.basename, fileFormat).valueOf();
});
Expand Down Expand Up @@ -155,7 +155,8 @@
{#each renderedDailyNotes as file (file)}
<DailyNote file={file} plugin={plugin} leaf={leaf}/>
{/each}
<div use:inview={{}} on:inview_init={startFillViewport} on:inview_change={infiniteHandler} on:inview_leave={stopFillViewport} />
<div use:inview={{}} on:inview_init={startFillViewport} on:inview_change={infiniteHandler}
on:inview_leave={stopFillViewport}/>
{#if !hasMore}
<div class="no-more-text">—— No more of results ——</div>
{/if}
Expand Down

0 comments on commit c3ccfeb

Please sign in to comment.