Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enzevalos_iphone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enzevalos
enzevalos_iphone
Commits
52b75341
Commit
52b75341
authored
5 years ago
by
Oliver Wiese
Browse files
Options
Downloads
Patches
Plain Diff
fix no title in attachment bug
parent
9b71aa59
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enzevalos_iphone/mail/IncomingMail.swift
+12
-2
12 additions, 2 deletions
enzevalos_iphone/mail/IncomingMail.swift
with
12 additions
and
2 deletions
enzevalos_iphone/mail/IncomingMail.swift
+
12
−
2
View file @
52b75341
...
@@ -652,11 +652,21 @@ class IncomingMail {
...
@@ -652,11 +652,21 @@ class IncomingMail {
private
func
parseUserReadableAttachments
(
parser
:
MCOMessageParser
,
sentEncrypted
:
Bool
=
false
)
->
Set
<
TempAttachment
>
{
private
func
parseUserReadableAttachments
(
parser
:
MCOMessageParser
,
sentEncrypted
:
Bool
=
false
)
->
Set
<
TempAttachment
>
{
var
attachments
=
Set
<
TempAttachment
>
()
var
attachments
=
Set
<
TempAttachment
>
()
for
at
in
parser
.
attachments
()
{
for
at
in
parser
.
attachments
()
{
if
let
attachment
=
at
as?
MCOAttachment
,
let
mimetype
=
MIMETYPE
.
findMIMETYPE
(
attachment
:
attachment
)
{
if
let
attachment
=
at
as?
MCOAttachment
,
let
mimetype
=
MIMETYPE
.
findMIMETYPE
(
attachment
:
attachment
)
,
attachment
.
data
.
count
>
0
{
if
(
mimetype
==
.
travelUse
||
mimetype
==
.
travelRepeal
)
&&
!
sentEncrypted
{
if
(
mimetype
==
.
travelUse
||
mimetype
==
.
travelRepeal
)
&&
!
sentEncrypted
{
continue
continue
}
}
attachments
.
insert
(
TempAttachment
(
name
:
attachment
.
filename
,
data
:
attachment
.
data
,
mimeType
:
mimetype
))
print
(
attachment
.
filename
)
print
(
attachment
.
data
.
count
)
print
(
mimetype
)
print
(
attachment
.
decodedString
())
print
(
attachment
.
contentID
)
print
(
attachment
.
description
)
var
name
=
"untitled"
if
let
n
=
attachment
.
filename
{
name
=
n
}
attachments
.
insert
(
TempAttachment
(
name
:
name
,
data
:
attachment
.
data
,
mimeType
:
mimetype
))
}
}
}
}
return
attachments
return
attachments
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment