Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion iOSClient/Data/NCManageDatabase+Trash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ extension NCManageDatabase {
do {
let realm = try Realm()
realm.refresh()
let results = realm.objects(tableTrash.self).filter("account == %@ AND filePath == %@", account, filePath).sorted(byKeyPath: "date", ascending: false)
let results = realm.objects(tableTrash.self).filter("account == %@ AND filePath == %@", account, filePath).sorted(byKeyPath: "trashbinDeletionTime", ascending: false)
return Array(results.map { tableTrash.init(value: $0) })
} catch let error as NSError {
NextcloudKit.shared.nkCommonInstance.writeLog("[ERROR] Could not access to database: \(error)")
Expand Down
4 changes: 2 additions & 2 deletions iOSClient/Trash/Cell/NCTrashCellProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ extension NCTrashCellProtocol where Self: UICollectionViewCell {
self.labelTitle.text = tableTrash.trashbinFileName
self.labelTitle.textColor = NCBrandColor.shared.textColor
if self is NCTrashListCell {
self.labelInfo?.text = NCUtility().dateDiff(tableTrash.date as Date)
self.labelInfo?.text = NCUtility().dateDiff(tableTrash.trashbinDeletionTime as Date)
} else {
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .short
dateFormatter.timeStyle = .none
dateFormatter.locale = Locale.current
self.labelInfo?.text = dateFormatter.string(from: tableTrash.date as Date)
self.labelInfo?.text = dateFormatter.string(from: tableTrash.trashbinDeletionTime as Date)
}
if tableTrash.directory {
self.imageItem.image = NCImageCache.images.folder
Expand Down