mirror of
https://github.com/chatmail/core.git
synced 2026-05-17 13:56:30 +03:00
Call update_device_chats automatically during configure (#1957)
update_device_chats() takes about 2 seconds on a modern device (Android) because the welcome image file has to be written to the disk as a blob. The problem was that this was done after the progress bar had vanished and before anything else happened so that I thought that something had gone wrong multiple times. The UIs have to remove update_device_chats(), too..
This commit is contained in:
@@ -807,21 +807,6 @@ pub unsafe extern "C" fn dc_add_device_msg(
|
||||
.to_u32()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_update_device_chats(context: *mut dc_context_t) {
|
||||
if context.is_null() {
|
||||
eprintln!("ignoring careless call to dc_update_device_chats()");
|
||||
return;
|
||||
}
|
||||
let ctx = &mut *context;
|
||||
|
||||
block_on(async move {
|
||||
ctx.update_device_chats()
|
||||
.await
|
||||
.unwrap_or_log_default(&ctx, "Failed to add device message")
|
||||
})
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_was_device_msg_ever_added(
|
||||
context: *mut dc_context_t,
|
||||
|
||||
Reference in New Issue
Block a user