갤러리 페이지에서 파일이 표시되지 않던 버그 수정

This commit is contained in:
static
2025-12-26 23:29:29 +09:00
parent 27a46bcc2e
commit 3e98e3d591
2 changed files with 7 additions and 2 deletions

View File

@@ -95,8 +95,13 @@
const unsubscribes = filesWithDate.map((file) => const unsubscribes = filesWithDate.map((file) =>
file.info.subscribe((value) => { file.info.subscribe((value) => {
const newDate = value?.createdAt ?? value?.lastModifiedAt; const newDate = value?.createdAt ?? value?.lastModifiedAt;
if (file.date?.getTime() === newDate?.getTime()) return; const newContentType = value?.contentType;
if (file.date?.getTime() === newDate?.getTime() && file.contentType === newContentType) {
return;
}
file.date = newDate; file.date = newDate;
file.contentType = newContentType;
buildRows(); buildRows();
}), }),
); );

View File

@@ -22,7 +22,7 @@
<AdaptiveDiv class="flex justify-evenly px-4 py-2"> <AdaptiveDiv class="flex justify-evenly px-4 py-2">
{#each pages as { path, label, icon: Icon }} {#each pages as { path, label, icon: Icon }}
<button <button
onclick={() => goto(path)} onclick={() => goto(path, { replaceState: true })}
class={[ class={[
"w-16 active:rounded-xl active:bg-gray-100", "w-16 active:rounded-xl active:bg-gray-100",
!page.url.pathname.startsWith(path) && "text-gray-600", !page.url.pathname.startsWith(path) && "text-gray-600",