mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 02:46:29 +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:
@@ -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