Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
enzevalos
enzevalos_iphone
Commits
127ac256
Commit
127ac256
authored
Apr 08, 2021
by
Oliver Wiese
Browse files
fix inbox icon
parent
0c6bea65
Changes
1
Hide whitespace changes
Inline
Side-by-side
enzevalos_iphone/persistentData/FolderRecord.swift
View file @
127ac256
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment