mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
3f2edb324b
commit
d084fddc55
1 changed files with 2 additions and 10 deletions
|
|
@ -134,22 +134,14 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
isRecentlyCreated(): boolean {
|
||||
if (this.source.attributes.upload_time) {
|
||||
return false
|
||||
}
|
||||
|
||||
const creationDate = this.source.attributes.creationdate
|
||||
? new Date(this.source.attributes.creationdate)
|
||||
: null
|
||||
|
||||
if (!creationDate) {
|
||||
if (!this.source.crtime) {
|
||||
return false
|
||||
}
|
||||
|
||||
const oneDayAgo = new Date()
|
||||
oneDayAgo.setDate(oneDayAgo.getDate() - 1)
|
||||
|
||||
return creationDate > oneDayAgo
|
||||
return this.source.crtime > oneDayAgo
|
||||
},
|
||||
|
||||
isRecentView(): boolean {
|
||||
|
|
|
|||
Loading…
Reference in a new issue