mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 03:16:29 +03:00
Fix more compiler problems
This commit is contained in:
@@ -7,7 +7,7 @@ use async_std::io::WriteExt;
|
||||
use strum_macros::{AsRefStr, Display, EnumIter, EnumProperty, EnumString};
|
||||
|
||||
use crate::blob::BlobObject;
|
||||
use crate::chat::ChatId;
|
||||
|
||||
use crate::constants::DC_VERSION_STR;
|
||||
use crate::contact::addr_cmp;
|
||||
use crate::context::Context;
|
||||
@@ -332,11 +332,7 @@ impl Context {
|
||||
if let Some(webxdc_message_id) =
|
||||
self.sql.get_raw_config_u32(Config::DebugLogging).await?
|
||||
{
|
||||
// TODO possible recursion?
|
||||
//use futures::FutureExt; // for boxed()
|
||||
//message::delete_msgs(self, &[MsgId::new(webxdc_message_id)])
|
||||
// .boxed() // Need boxed() because of recursion
|
||||
// .await;
|
||||
message::delete_msgs(self, &[MsgId::new(webxdc_message_id)]).await;
|
||||
}
|
||||
} else {
|
||||
let data: &[u8] = include_bytes!("../test-data/webxdc/minimal.xdc");
|
||||
|
||||
@@ -1287,7 +1287,12 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
|
||||
context.emit_msgs_changed_without_ids();
|
||||
|
||||
// Run housekeeping to delete unused blobs.
|
||||
context.set_config(Config::LastHousekeeping, None).await?;
|
||||
// We need to use set_raw_config() here since with set_config() it
|
||||
// wouldn't compile ("recursion in an `async fn`")
|
||||
context
|
||||
.sql
|
||||
.set_raw_config(Config::LastHousekeeping, None)
|
||||
.await?;
|
||||
}
|
||||
|
||||
// Interrupt Inbox loop to start message deletion and run housekeeping.
|
||||
|
||||
Reference in New Issue
Block a user