aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifications.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/notifications.vala')
-rw-r--r--main/src/ui/notifications.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala
index 77a290a0..277a7a09 100644
--- a/main/src/ui/notifications.vala
+++ b/main/src/ui/notifications.vala
@@ -62,10 +62,11 @@ public class Notifications : Object {
FileItem file_item = content_item as FileItem;
FileTransfer transfer = file_item.file_transfer;
+ bool file_is_image = transfer.mime_type != null && transfer.mime_type.has_prefix("image");
if (transfer.direction == Message.DIRECTION_SENT) {
- text = transfer.mime_type.has_prefix("image") ? _("Image sent") : _("File sent");
+ text = file_is_image ? _("Image sent") : _("File sent");
} else {
- text = transfer.mime_type.has_prefix("image") ? _("Image received") : _("File received");
+ text = file_is_image ? _("Image received") : _("File received");
}
break;
}