mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 01:16:29 +03:00
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.
This commit is contained in:
@@ -318,10 +318,6 @@ impl Context {
|
||||
.yellow {
|
||||
background-color: #fdc625;
|
||||
}
|
||||
.not-started-error {
|
||||
font-size: 2em;
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>"#
|
||||
@@ -341,7 +337,10 @@ impl Context {
|
||||
sched.smtp.state.connectivity.clone(),
|
||||
),
|
||||
_ => {
|
||||
ret += "<div class=\"not-started-error\">Error: IO Not Started</div><p>Please report this issue to the app developer.</p>\n</body></html>\n";
|
||||
ret += &format!(
|
||||
"<h3>{}</h3>\n</body></html>\n",
|
||||
stock_str::not_connected(self).await
|
||||
);
|
||||
return Ok(ret);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user