mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
rename has_device_msg() to was_device_msg_ever_added() what describes better what the function is doing
This commit is contained in:
@@ -842,18 +842,19 @@ pub unsafe extern "C" fn dc_add_device_msg(
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_has_device_msg(
|
||||
pub unsafe extern "C" fn dc_was_device_msg_ever_added(
|
||||
context: *mut dc_context_t,
|
||||
label: *const libc::c_char,
|
||||
) -> libc::c_int {
|
||||
if context.is_null() || label.is_null() {
|
||||
eprintln!("ignoring careless call to dc_has_device_msg()");
|
||||
eprintln!("ignoring careless call to dc_was_device_msg_ever_added()");
|
||||
return 0;
|
||||
}
|
||||
let ffi_context = &mut *context;
|
||||
ffi_context
|
||||
.with_inner(|ctx| {
|
||||
chat::has_device_msg(ctx, &to_string_lossy(label)).unwrap_or(false) as libc::c_int
|
||||
chat::was_device_msg_ever_added(ctx, &to_string_lossy(label)).unwrap_or(false)
|
||||
as libc::c_int
|
||||
})
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user