From fe53eb2b3768e7f96a5b96cb0bc5d7f25fe2c61c Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 12 Nov 2024 15:39:53 +0100 Subject: [PATCH] feat: tune down io-not-started info in connectivity-html due to async processing, it may happen getConnectivityHtml() is called from UI before startIO() is actually called. eg. on iOS, we may delay startIo() if another process is still processing a PUSH notification - when during this time, the connectivity view is opened, it is weird if a big error "CONTACT THE DEVELOPERS!11!!!" is shown :) also, there is not really a function is_connected(), for $reasons, as this turned out to be flacky, so it is not even easy to check the state before calling getConnectivityHtml() it is not worth in doing too much special, we are talking about rare situaton, also, the connectivity view gets updated some moments later. --- src/scheduler/connectivity.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/scheduler/connectivity.rs b/src/scheduler/connectivity.rs index 6e9e1d200c..337b126caf 100644 --- a/src/scheduler/connectivity.rs +++ b/src/scheduler/connectivity.rs @@ -318,10 +318,6 @@ impl Context { .yellow { background-color: #fdc625; } - .not-started-error { - font-size: 2em; - color: red; - } "# @@ -341,7 +337,10 @@ impl Context { sched.smtp.state.connectivity.clone(), ), _ => { - ret += "
Error: IO Not Started

Please report this issue to the app developer.

\n\n"; + ret += &format!( + "

{}

\n\n", + stock_str::not_connected(self).await + ); return Ok(ret); } };