use tri-state ImageAction instead of Option<Option>

This commit is contained in:
B. Petersen
2019-12-09 16:23:59 +01:00
committed by holger krekel
parent c62532a665
commit c3fd0889e2
3 changed files with 36 additions and 16 deletions

View File

@@ -238,8 +238,8 @@ pub fn dc_receive_imf(
);
}
if let Some(profile_image) = mime_parser.profile_image {
match contact::set_profile_image(&context, from_id, profile_image) {
if mime_parser.profile_image != ImageAction::None {
match contact::set_profile_image(&context, from_id, mime_parser.profile_image) {
Ok(()) => {
context.call_cb(Event::ChatModified(chat_id));
true