mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
show 'Not connected' if storage information are not yet available (#3222)
* show 'Not connected' if storage information are not yet available 'One moment' is a bit misleading in case the device is offline as it will take more than a moment until that will be updated :) * update CHANGELOG
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### API-Changes
|
||||
|
||||
- replaced stock string `DC_STR_ONE_MOMENT` by `DC_STR_NOT_CONNECTED` #3222
|
||||
|
||||
### Fixes
|
||||
|
||||
- Take `delete_device_after` into account when calculating ephemeral loop timeout #3211
|
||||
|
||||
@@ -6223,9 +6223,7 @@ void dc_event_unref(dc_event_t* event);
|
||||
/// `%1$s` will be replaced by the domain of the configured e-mail address.
|
||||
#define DC_STR_STORAGE_ON_DOMAIN 105
|
||||
|
||||
/// "One moment…"
|
||||
///
|
||||
/// Used in the connectivity view when some information are not yet there.
|
||||
/// @deprecated Deprecated 2022-04-16, this string is no longer needed.
|
||||
#define DC_STR_ONE_MOMENT 106
|
||||
|
||||
/// "Connected"
|
||||
@@ -6314,6 +6312,11 @@ void dc_event_unref(dc_event_t* event);
|
||||
/// `%1$s` will be replaced with the group name.
|
||||
#define DC_STR_SECURE_JOIN_GROUP_QR_DESC 120
|
||||
|
||||
/// "Not connected"
|
||||
///
|
||||
/// Used as status in the connectivity view.
|
||||
#define DC_STR_NOT_CONNECTED 121
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -538,7 +538,7 @@ impl Context {
|
||||
self.schedule_quota_update().await?;
|
||||
}
|
||||
} else {
|
||||
ret += &format!("<li>{}</li>", stock_str::one_moment(self).await);
|
||||
ret += &format!("<li>{}</li>", stock_str::not_connected(self).await);
|
||||
self.schedule_quota_update().await?;
|
||||
}
|
||||
ret += "</ul>";
|
||||
|
||||
@@ -287,9 +287,6 @@ pub enum StockMessage {
|
||||
#[strum(props(fallback = "Storage on %1$s"))]
|
||||
StorageOnDomain = 105,
|
||||
|
||||
#[strum(props(fallback = "One moment…"))]
|
||||
OneMoment = 106,
|
||||
|
||||
#[strum(props(fallback = "Connected"))]
|
||||
Connected = 107,
|
||||
|
||||
@@ -332,6 +329,9 @@ pub enum StockMessage {
|
||||
|
||||
#[strum(props(fallback = "Scan to join group %1$s"))]
|
||||
SecureJoinGroupQRDescription = 120,
|
||||
|
||||
#[strum(props(fallback = "Not connected"))]
|
||||
NotConnected = 121,
|
||||
}
|
||||
|
||||
impl StockMessage {
|
||||
@@ -1009,9 +1009,9 @@ pub(crate) async fn storage_on_domain(context: &Context, domain: impl AsRef<str>
|
||||
.replace1(domain)
|
||||
}
|
||||
|
||||
/// Stock string: `One moment…`.
|
||||
pub(crate) async fn one_moment(context: &Context) -> String {
|
||||
translated(context, StockMessage::OneMoment).await
|
||||
/// Stock string: `Not connected`.
|
||||
pub(crate) async fn not_connected(context: &Context) -> String {
|
||||
translated(context, StockMessage::NotConnected).await
|
||||
}
|
||||
|
||||
/// Stock string: `Connected`.
|
||||
|
||||
Reference in New Issue
Block a user