mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
replace goto with ok_to_continue
This commit is contained in:
committed by
holger krekel
parent
1c5d07a29f
commit
125df968d2
@@ -786,7 +786,7 @@ pub unsafe fn dc_msg_get_summary<'a>(
|
||||
msg: *mut dc_msg_t<'a>,
|
||||
mut chat: *const Chat<'a>,
|
||||
) -> *mut dc_lot_t {
|
||||
let current_block: u64;
|
||||
let mut ok_to_continue = true;
|
||||
let ret: *mut dc_lot_t = dc_lot_new();
|
||||
let mut chat_to_delete: *mut Chat = 0 as *mut Chat;
|
||||
|
||||
@@ -794,17 +794,12 @@ pub unsafe fn dc_msg_get_summary<'a>(
|
||||
if chat.is_null() {
|
||||
chat_to_delete = dc_get_chat((*msg).context, (*msg).chat_id);
|
||||
if chat_to_delete.is_null() {
|
||||
current_block = 15204159476013091401;
|
||||
ok_to_continue = false;
|
||||
} else {
|
||||
chat = chat_to_delete;
|
||||
current_block = 7815301370352969686;
|
||||
}
|
||||
} else {
|
||||
current_block = 7815301370352969686;
|
||||
}
|
||||
match current_block {
|
||||
15204159476013091401 => {}
|
||||
_ => {
|
||||
if ok_to_continue {
|
||||
let contact = if (*msg).from_id != DC_CONTACT_ID_SELF as libc::c_uint
|
||||
&& ((*chat).type_0 == 120 || (*chat).type_0 == 130)
|
||||
{
|
||||
@@ -814,7 +809,6 @@ pub unsafe fn dc_msg_get_summary<'a>(
|
||||
};
|
||||
|
||||
dc_lot_fill(ret, msg, chat, contact.as_ref(), (*msg).context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user