Skip to content

Commit 69265b8

Browse files
refactor(recent-search): use d:creationdate instead of c:creation_time and crtime instead of attributes.upload_time
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
1 parent b9fc55c commit 69265b8

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

apps/files/src/components/FileEntry/FileEntryPreview.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,14 @@ export default Vue.extend({
120120
},
121121
122122
isRecentlyCreated(): boolean {
123-
if (this.source.attributes.upload_time) {
124-
return false
125-
}
126-
127-
const creationDate = this.source.attributes.creationdate
128-
? new Date(this.source.attributes.creationdate)
129-
: null
130-
131-
if (!creationDate) {
123+
if (!this.source.crtime) {
132124
return false
133125
}
134126
135127
const oneDayAgo = new Date()
136128
oneDayAgo.setDate(oneDayAgo.getDate() - 1)
137129
138-
return creationDate > oneDayAgo
130+
return this.source.crtime > oneDayAgo
139131
},
140132
141133
isRecentView(): boolean {

0 commit comments

Comments
 (0)