mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
feat: Remove "Download maximum available until" and remove stock string DC_STR_DOWNLOAD_AVAILABILITY (#7369)
Remove "Download maximum available until", because it's unreliable - chatmail servers may delete full-messages quicker. This is part of #7367
This commit is contained in:
@@ -7272,13 +7272,6 @@ void dc_event_unref(dc_event_t* event);
|
||||
/// `%1$s` will be replaced by human-readable size (e.g. "1.2 MiB").
|
||||
#define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
|
||||
|
||||
/// "Download maximum available until %1$s"
|
||||
///
|
||||
/// Appended after some separator to @ref DC_STR_PARTIAL_DOWNLOAD_MSG_BODY.
|
||||
///
|
||||
/// `%1$s` will be replaced by human-readable date and time.
|
||||
#define DC_STR_DOWNLOAD_AVAILABILITY 100
|
||||
|
||||
/// "Multi Device Synchronization"
|
||||
///
|
||||
/// Used in subjects of outgoing sync messages.
|
||||
|
||||
@@ -12,7 +12,6 @@ use crate::context::Context;
|
||||
use crate::imap::session::Session;
|
||||
use crate::message::{Message, MsgId, Viewtype};
|
||||
use crate::mimeparser::{MimeMessage, Part};
|
||||
use crate::tools::time;
|
||||
use crate::{EventType, chatlist_events, stock_str};
|
||||
|
||||
/// Download limits should not be used below `MIN_DOWNLOAD_LIMIT`.
|
||||
@@ -230,14 +229,6 @@ impl MimeMessage {
|
||||
"[{}]",
|
||||
stock_str::partial_download_msg_body(context, org_bytes).await
|
||||
);
|
||||
if let Some(delete_server_after) = context.get_config_delete_server_after().await? {
|
||||
let until = stock_str::download_availability(
|
||||
context,
|
||||
time() + max(delete_server_after, MIN_DELETE_SERVER_AFTER),
|
||||
)
|
||||
.await;
|
||||
text += format!(" [{until}]").as_str();
|
||||
};
|
||||
|
||||
info!(context, "Partial download: {}", text);
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ use crate::contact::{Contact, ContactId};
|
||||
use crate::context::Context;
|
||||
use crate::message::{Message, Viewtype};
|
||||
use crate::param::Param;
|
||||
use crate::tools::timestamp_to_str;
|
||||
|
||||
/// Storage for string translations.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -170,9 +169,6 @@ pub enum StockMessage {
|
||||
#[strum(props(fallback = "%1$s message"))]
|
||||
PartialDownloadMsgBody = 99,
|
||||
|
||||
#[strum(props(fallback = "Download maximum available until %1$s"))]
|
||||
DownloadAvailability = 100,
|
||||
|
||||
#[strum(props(fallback = "Multi Device Synchronization"))]
|
||||
SyncMsgSubject = 101,
|
||||
|
||||
@@ -1127,13 +1123,6 @@ pub(crate) async fn partial_download_msg_body(context: &Context, org_bytes: u32)
|
||||
.replace1(size)
|
||||
}
|
||||
|
||||
/// Stock string: `Download maximum available until %1$s`.
|
||||
pub(crate) async fn download_availability(context: &Context, timestamp: i64) -> String {
|
||||
translated(context, StockMessage::DownloadAvailability)
|
||||
.await
|
||||
.replace1(×tamp_to_str(timestamp))
|
||||
}
|
||||
|
||||
/// Stock string: `Incoming Messages`.
|
||||
pub(crate) async fn incoming_messages(context: &Context) -> String {
|
||||
translated(context, StockMessage::IncomingMessages).await
|
||||
|
||||
Reference in New Issue
Block a user