Commit 127ac256 authored by Oliver Wiese's avatar Oliver Wiese
Browse files

fix inbox icon

parent 0c6bea65
......@@ -13,7 +13,7 @@ import CoreData
extension FolderRecord {
static var FetchRequest: NSFetchRequest<FolderRecord> {
let request: NSFetchRequest<FolderRecord> = NSFetchRequest<FolderRecord>(entityName: FolderRecord.entityName)
request.sortDescriptors = [NSSortDescriptor(key: "path", ascending: true)]
request.sortDescriptors = [NSSortDescriptor(key: "flags", ascending: false), NSSortDescriptor(key: "path", ascending: true)]
return request
}
}
......@@ -37,7 +37,14 @@ extension FolderRecord {
if let minUID = properties.minUID {
self.minUID = minUID
}
self.flags = properties.flags
if properties.flags != 0 {
self.flags = properties.flags
}
if UserManager.backendInboxFolderPath == properties.path {
var flag = MCOIMAPFolderFlag(rawValue: Int(self.flags))
flag.formUnion(.inbox)
self.flags = Int16(flag.rawValue)
}
path = properties.path
}
......@@ -56,10 +63,6 @@ extension FolderRecord {
var type: FolderType {
let flags = MCOIMAPFolderFlag(rawValue: Int(self.flags))
print(flags.isEmpty)
print(self.flags)
// TODO: IS EMPTY! WHY? Do we add this information?
print(flags)
if flags.contains(MCOIMAPFolderFlag.drafts) {
return .Draft
}
......@@ -100,7 +103,6 @@ extension FolderRecord: DisplayFolder {
}
var icon: Image {
print(self.path)
var label = "folder"
switch type {
case .Archive:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment