Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
8eaa0f5e
Commit
8eaa0f5e
authored
May 03, 2021
by
Laurent Montel
😁
Browse files
Minor optimization
parent
a725ca3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
messageviewer/src/viewer/attachmentstrategy.cpp
View file @
8eaa0f5e
...
...
@@ -25,14 +25,15 @@ using namespace MessageViewer;
static
AttachmentStrategy
::
Display
smartDisplay
(
KMime
::
Content
*
node
)
{
const
auto
cd
=
node
->
contentDisposition
(
false
);
if
(
cd
&&
cd
->
disposition
()
==
KMime
::
Headers
::
CDinline
)
{
// explict "inline" disposition:
return
AttachmentStrategy
::
Inline
;
}
if
(
cd
&&
cd
->
disposition
()
==
KMime
::
Headers
::
CDattachment
)
{
// explicit "attachment" disposition:
return
AttachmentStrategy
::
AsIcon
;
if
(
cd
)
{
if
(
cd
->
disposition
()
==
KMime
::
Headers
::
CDinline
)
{
// explict "inline" disposition:
return
AttachmentStrategy
::
Inline
;
}
if
(
cd
->
disposition
()
==
KMime
::
Headers
::
CDattachment
)
{
// explicit "attachment" disposition:
return
AttachmentStrategy
::
AsIcon
;
}
}
const
auto
ct
=
node
->
contentType
(
false
);
...
...
Write
Preview
Markdown
is supported
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