This repository was archived by the owner on Feb 3, 2025. It is now read-only.
File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -267,8 +267,12 @@ function Activity({ data }: { data: ActivityType }) {
267
267
export function KaizokuNavbar ( ) {
268
268
const { classes } = useStyles ( ) ;
269
269
270
- const historyQuery = trpc . manga . history . useQuery ( ) ;
271
- const activityQuery = trpc . manga . activity . useQuery ( ) ;
270
+ const historyQuery = trpc . manga . history . useQuery ( undefined , {
271
+ refetchInterval : 5 * 1000 ,
272
+ } ) ;
273
+ const activityQuery = trpc . manga . activity . useQuery ( undefined , {
274
+ refetchInterval : 5 * 1000 ,
275
+ } ) ;
272
276
const libraryQuery = trpc . library . query . useQuery ( ) ;
273
277
274
278
if ( ! libraryQuery . data ) {
Original file line number Diff line number Diff line change @@ -318,10 +318,20 @@ const shouldIncludeFile = (chapterFile: string) => {
318
318
export const getChapterFromLocal = async ( chapterFile : string ) => {
319
319
try {
320
320
const stat = await fs . stat ( chapterFile ) ;
321
+ let createdAt = new Date ( ) ;
322
+
323
+ if ( stat . birthtime . getTime ( ) !== 0 ) {
324
+ createdAt = stat . birthtime ;
325
+ } else if ( stat . ctime . getTime ( ) !== 0 ) {
326
+ createdAt = stat . ctime ;
327
+ } else if ( stat . mtime . getTime ( ) !== 0 ) {
328
+ createdAt = stat . mtime ;
329
+ }
330
+
321
331
return {
322
332
index : getChapterIndexFromFile ( chapterFile ) ! ,
323
333
size : stat . size ,
324
- createdAt : stat . birthtime ,
334
+ createdAt,
325
335
fileName : path . basename ( chapterFile ) ,
326
336
} ;
327
337
} catch ( err ) {
You can’t perform that action at this time.
0 commit comments