From 990f4dce9b625a590e118d1d1f7f9bef9ef4f3b2 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Wed, 15 Nov 2023 06:05:05 +0100 Subject: [PATCH] return connectivity html even when IO is stopped. The returned error is unexpected and no UI I tested with stoped IO really handled it besides maybe displaying a toast. (desktop and iOS don't handle it, deltatouch shows a toast) This should not be shown to the user, it is only shown to the user if the UI has a bug, so that bug should be clearly visible. --- src/scheduler/connectivity.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scheduler/connectivity.rs b/src/scheduler/connectivity.rs index 0c72220e4..104cdd584 100644 --- a/src/scheduler/connectivity.rs +++ b/src/scheduler/connectivity.rs @@ -2,7 +2,7 @@ use core::fmt; use std::cmp::min; use std::{iter::once, ops::Deref, sync::Arc}; -use anyhow::{anyhow, Result}; +use anyhow::Result; use humansize::{format_size, BINARY}; use tokio::sync::Mutex; @@ -299,6 +299,10 @@ impl Context { .yellow { background-color: #fdc625; } + .not-started-error { + font-size: 2em; + color: red; + } "# @@ -318,7 +322,8 @@ impl Context { sched.smtp.state.connectivity.clone(), ), _ => { - return Err(anyhow!("Not started")); + ret += "
Error: IO Not Started

Please report this issue to the app developer.

\n\n"; + return Ok(ret); } }; drop(lock);