mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
refactor: make last_added_location_id an Option
This commit is contained in:
@@ -66,7 +66,7 @@ pub struct MimeFactory<'a> {
|
||||
in_reply_to: String,
|
||||
references: String,
|
||||
req_mdn: bool,
|
||||
last_added_location_id: u32,
|
||||
last_added_location_id: Option<u32>,
|
||||
|
||||
/// If the created mime-structure contains sync-items,
|
||||
/// the IDs of these items are listed here.
|
||||
@@ -85,7 +85,7 @@ pub struct RenderedEmail {
|
||||
// pub envelope: Envelope,
|
||||
pub is_encrypted: bool,
|
||||
pub is_gossiped: bool,
|
||||
pub last_added_location_id: u32,
|
||||
pub last_added_location_id: Option<u32>,
|
||||
|
||||
/// A comma-separated string of sync-IDs that are used by the rendered email
|
||||
/// and must be deleted once the message is actually queued for sending
|
||||
@@ -223,7 +223,7 @@ impl<'a> MimeFactory<'a> {
|
||||
in_reply_to,
|
||||
references,
|
||||
req_mdn,
|
||||
last_added_location_id: 0,
|
||||
last_added_location_id: None,
|
||||
sync_ids_to_delete: None,
|
||||
attach_selfavatar,
|
||||
};
|
||||
@@ -264,7 +264,7 @@ impl<'a> MimeFactory<'a> {
|
||||
in_reply_to: String::default(),
|
||||
references: String::default(),
|
||||
req_mdn: false,
|
||||
last_added_location_id: 0,
|
||||
last_added_location_id: None,
|
||||
sync_ids_to_delete: None,
|
||||
attach_selfavatar: false,
|
||||
};
|
||||
@@ -876,7 +876,7 @@ impl<'a> MimeFactory<'a> {
|
||||
.body(kml_content);
|
||||
if !self.msg.param.exists(Param::SetLatitude) {
|
||||
// otherwise, the independent location is already filed
|
||||
self.last_added_location_id = last_added_location_id;
|
||||
self.last_added_location_id = Some(last_added_location_id);
|
||||
}
|
||||
Ok(part)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user