mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
cargo-fmt
This commit is contained in:
10
src/chat.rs
10
src/chat.rs
@@ -871,13 +871,14 @@ fn maybe_delete_draft(context: &Context, chat_id: u32) -> bool {
|
|||||||
///
|
///
|
||||||
/// Return true on success, false on database error.
|
/// Return true on success, false on database error.
|
||||||
fn do_set_draft(context: &Context, chat_id: u32, msg: &mut Message) -> bool {
|
fn do_set_draft(context: &Context, chat_id: u32, msg: &mut Message) -> bool {
|
||||||
|
|
||||||
match msg.type_0 {
|
match msg.type_0 {
|
||||||
Viewtype::Unknown => return false,
|
Viewtype::Unknown => return false,
|
||||||
Viewtype::Text => if msg.text.as_ref().map_or(false, |s| s.is_empty()) {
|
Viewtype::Text => {
|
||||||
|
if msg.text.as_ref().map_or(false, |s| s.is_empty()) {
|
||||||
return false;
|
return false;
|
||||||
},
|
}
|
||||||
_ =>
|
}
|
||||||
|
_ => {
|
||||||
if let Some(path_filename) = msg.param.get(Param::File) {
|
if let Some(path_filename) = msg.param.get(Param::File) {
|
||||||
let mut path_filename = path_filename.to_string();
|
let mut path_filename = path_filename.to_string();
|
||||||
if dc_msg_is_increation(msg) && !dc_is_blobdir_path(context, &path_filename) {
|
if dc_msg_is_increation(msg) && !dc_is_blobdir_path(context, &path_filename) {
|
||||||
@@ -889,6 +890,7 @@ fn do_set_draft(context: &Context, chat_id: u32, msg: &mut Message) -> bool {
|
|||||||
msg.param.set(Param::File, path_filename);
|
msg.param.set(Param::File, path_filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sql::execute(
|
sql::execute(
|
||||||
context,
|
context,
|
||||||
|
|||||||
Reference in New Issue
Block a user