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

@@ -7,7 +7,7 @@ use std::time::Duration;
use anyhow::{bail, ensure, Result};
use deltachat::chat::{
self, Chat, ChatId, ChatItem, ChatVisibility, GetChatMsgsOptions, MuteDuration,
self, Chat, ChatId, ChatItem, ChatVisibility, MessageListOptions, MuteDuration,
};
use deltachat::chatlist::*;
use deltachat::constants::*;
@@ -624,9 +624,9 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
let msglist = chat::get_chat_msgs_ex(
&context,
sel_chat.get_id(),
GetChatMsgsOptions {
MessageListOptions {
info_only: false,
add_daymarker: true,
..Default::default()
},
)
.await?;