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

@@ -12,7 +12,7 @@ use deltachat::calls::ice_servers;
use deltachat::chat::{
self, add_contact_to_chat, forward_msgs, forward_msgs_2ctx, get_chat_media, get_chat_msgs,
get_chat_msgs_ex, markfresh_chat, marknoticed_all_chats, marknoticed_chat,
remove_contact_from_chat, Chat, ChatId, ChatItem, ChatMsgsFilter, GetChatMsgsOptions,
remove_contact_from_chat, Chat, ChatId, ChatItem, MessageListOptions,
};
use deltachat::chatlist::Chatlist;
use deltachat::config::{get_all_ui_config_keys, Config};
@@ -1382,10 +1382,9 @@ impl CommandApi {
let msg = get_chat_msgs_ex(
&ctx,
ChatId::new(chat_id),
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
MessageListOptions {
info_only,
add_daymarker,
..Default::default()
},
)
.await?;
@@ -1429,10 +1428,9 @@ impl CommandApi {
let msg = get_chat_msgs_ex(
&ctx,
ChatId::new(chat_id),
GetChatMsgsOptions {
filter: ChatMsgsFilter::info_only(info_only),
MessageListOptions {
info_only,
add_daymarker,
..Default::default()
},
)
.await?;