Skip to content

Commit fe53eb2

Browse files
committed
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.
1 parent 9c0e932 commit fe53eb2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/scheduler/connectivity.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,6 @@ impl Context {
318318
.yellow {
319319
background-color: #fdc625;
320320
}
321-
.not-started-error {
322-
font-size: 2em;
323-
color: red;
324-
}
325321
</style>
326322
</head>
327323
<body>"#
@@ -341,7 +337,10 @@ impl Context {
341337
sched.smtp.state.connectivity.clone(),
342338
),
343339
_ => {
344-
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";
340+
ret += &format!(
341+
"<h3>{}</h3>\n</body></html>\n",
342+
stock_str::not_connected(self).await
343+
);
345344
return Ok(ret);
346345
}
347346
};

0 commit comments

Comments
 (0)