mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
Rename markseen_on_imap to markseen_on_imap_table and document it
This commit is contained in:
@@ -24,7 +24,7 @@ use crate::download::DownloadState;
|
|||||||
use crate::ephemeral::{stock_ephemeral_timer_changed, Timer as EphemeralTimer};
|
use crate::ephemeral::{stock_ephemeral_timer_changed, Timer as EphemeralTimer};
|
||||||
use crate::events::EventType;
|
use crate::events::EventType;
|
||||||
use crate::headerdef::{HeaderDef, HeaderDefMap};
|
use crate::headerdef::{HeaderDef, HeaderDefMap};
|
||||||
use crate::imap::markseen_on_imap;
|
use crate::imap::markseen_on_imap_table;
|
||||||
use crate::location;
|
use crate::location;
|
||||||
use crate::log::LogExt;
|
use crate::log::LogExt;
|
||||||
use crate::message::{
|
use crate::message::{
|
||||||
@@ -339,7 +339,7 @@ pub(crate) async fn dc_receive_imf_inner(
|
|||||||
.await?;
|
.await?;
|
||||||
} else if !mime_parser.mdn_reports.is_empty() && mime_parser.has_chat_version() {
|
} else if !mime_parser.mdn_reports.is_empty() && mime_parser.has_chat_version() {
|
||||||
// This is a Delta Chat MDN. Mark as read.
|
// This is a Delta Chat MDN. Mark as read.
|
||||||
markseen_on_imap(context, rfc724_mid).await?;
|
markseen_on_imap_table(context, rfc724_mid).await?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1936,7 +1936,7 @@ pub(crate) async fn prefetch_should_download(
|
|||||||
.await?
|
.await?
|
||||||
.is_some()
|
.is_some()
|
||||||
{
|
{
|
||||||
markseen_on_imap(context, message_id).await?;
|
markseen_on_imap_table(context, message_id).await?;
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2070,7 +2070,9 @@ async fn mark_seen_by_uid(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn markseen_on_imap(context: &Context, message_id: &str) -> Result<()> {
|
/// Schedule marking the message as Seen on IMAP by adding all known IMAP messages corresponding to
|
||||||
|
/// the given Message-ID to `imap_markseen` table.
|
||||||
|
pub(crate) async fn markseen_on_imap_table(context: &Context, message_id: &str) -> Result<()> {
|
||||||
context
|
context
|
||||||
.sql
|
.sql
|
||||||
.execute(
|
.execute(
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ use crate::dc_tools::{
|
|||||||
use crate::download::DownloadState;
|
use crate::download::DownloadState;
|
||||||
use crate::ephemeral::{start_ephemeral_timers_msgids, Timer as EphemeralTimer};
|
use crate::ephemeral::{start_ephemeral_timers_msgids, Timer as EphemeralTimer};
|
||||||
use crate::events::EventType;
|
use crate::events::EventType;
|
||||||
use crate::imap::markseen_on_imap;
|
use crate::imap::markseen_on_imap_table;
|
||||||
use crate::job::{self, Action};
|
use crate::job::{self, Action};
|
||||||
use crate::log::LogExt;
|
use crate::log::LogExt;
|
||||||
use crate::mimeparser::{parse_message_id, FailureReport, SystemMessage};
|
use crate::mimeparser::{parse_message_id, FailureReport, SystemMessage};
|
||||||
@@ -1357,7 +1357,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec<MsgId>) -> Result<()>
|
|||||||
update_msg_state(context, id, MessageState::InSeen).await?;
|
update_msg_state(context, id, MessageState::InSeen).await?;
|
||||||
info!(context, "Seen message {}.", id);
|
info!(context, "Seen message {}.", id);
|
||||||
|
|
||||||
markseen_on_imap(context, &curr_rfc724_mid).await?;
|
markseen_on_imap_table(context, &curr_rfc724_mid).await?;
|
||||||
|
|
||||||
// Read receipts for system messages are never sent. These messages have no place to
|
// Read receipts for system messages are never sent. These messages have no place to
|
||||||
// display received read receipt anyway. And since their text is locally generated,
|
// display received read receipt anyway. And since their text is locally generated,
|
||||||
|
|||||||
Reference in New Issue
Block a user