Skip to content

Commit 8140ebc

Browse files
committed
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
1 parent b20da3c commit 8140ebc

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

deltachat-ffi/deltachat.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7250,13 +7250,6 @@ void dc_event_unref(dc_event_t* event);
72507250
/// `%1$s` will be replaced by human-readable size (e.g. "1.2 MiB").
72517251
#define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
72527252

7253-
/// "Download maximum available until %1$s"
7254-
///
7255-
/// Appended after some separator to @ref DC_STR_PARTIAL_DOWNLOAD_MSG_BODY.
7256-
///
7257-
/// `%1$s` will be replaced by human-readable date and time.
7258-
#define DC_STR_DOWNLOAD_AVAILABILITY 100
7259-
72607253
/// "Multi Device Synchronization"
72617254
///
72627255
/// Used in subjects of outgoing sync messages.

src/download.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use crate::imap::session::Session;
1313
use crate::log::info;
1414
use crate::message::{Message, MsgId, Viewtype};
1515
use crate::mimeparser::{MimeMessage, Part};
16-
use crate::tools::time;
1716
use crate::{EventType, chatlist_events, stock_str};
1817

1918
/// Download limits should not be used below `MIN_DOWNLOAD_LIMIT`.
@@ -231,14 +230,6 @@ impl MimeMessage {
231230
"[{}]",
232231
stock_str::partial_download_msg_body(context, org_bytes).await
233232
);
234-
if let Some(delete_server_after) = context.get_config_delete_server_after().await? {
235-
let until = stock_str::download_availability(
236-
context,
237-
time() + max(delete_server_after, MIN_DELETE_SERVER_AFTER),
238-
)
239-
.await;
240-
text += format!(" [{until}]").as_str();
241-
};
242233

243234
info!(context, "Partial download: {}", text);
244235

src/stock_str.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use crate::contact::{Contact, ContactId, Origin};
1717
use crate::context::Context;
1818
use crate::message::{Message, Viewtype};
1919
use crate::param::Param;
20-
use crate::tools::timestamp_to_str;
2120

2221
/// Storage for string translations.
2322
#[derive(Debug, Clone)]
@@ -177,9 +176,6 @@ pub enum StockMessage {
177176
#[strum(props(fallback = "%1$s message"))]
178177
PartialDownloadMsgBody = 99,
179178

180-
#[strum(props(fallback = "Download maximum available until %1$s"))]
181-
DownloadAvailability = 100,
182-
183179
#[strum(props(fallback = "Multi Device Synchronization"))]
184180
SyncMsgSubject = 101,
185181

@@ -1194,13 +1190,6 @@ pub(crate) async fn partial_download_msg_body(context: &Context, org_bytes: u32)
11941190
.replace1(size)
11951191
}
11961192

1197-
/// Stock string: `Download maximum available until %1$s`.
1198-
pub(crate) async fn download_availability(context: &Context, timestamp: i64) -> String {
1199-
translated(context, StockMessage::DownloadAvailability)
1200-
.await
1201-
.replace1(&timestamp_to_str(timestamp))
1202-
}
1203-
12041193
/// Stock string: `Incoming Messages`.
12051194
pub(crate) async fn incoming_messages(context: &Context) -> String {
12061195
translated(context, StockMessage::IncomingMessages).await

0 commit comments

Comments
 (0)