Start extracting the logic for getting the last n messages into its own function

This commit is contained in:
Hocuri
2026-04-21 15:23:19 +02:00
parent cc818d9099
commit ceb10869c9
6 changed files with 146 additions and 103 deletions

View File

@@ -22,7 +22,7 @@ use std::sync::{Arc, LazyLock, Mutex};
use std::time::{Duration, SystemTime};
use anyhow::Context as _;
use deltachat::chat::{ChatId, ChatMsgsFilter, ChatVisibility, GetChatMsgsOptions, MuteDuration};
use deltachat::chat::{ChatId, ChatVisibility, MessageListOptions, MuteDuration};
use deltachat::constants::DC_MSG_ID_LAST_SPECIAL;
use deltachat::contact::{Contact, ContactId, Origin};
use deltachat::context::{Context, ContextBuilder};
@@ -1345,10 +1345,9 @@ pub unsafe extern "C" fn dc_get_chat_msgs(
chat::get_chat_msgs_ex(
ctx,
ChatId::new(chat_id),
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
MessageListOptions {
info_only,
add_daymarker,
..Default::default()
},
)
.await