Many imorovments
This commit is contained in:
@@ -1650,14 +1650,22 @@ fn drain_thumbnails(
|
||||
// carry no embedded preview.
|
||||
ThumbnailMessage::Ready(t) => {
|
||||
w.set_library_thumbs_done(w.get_library_thumbs_done() + 1);
|
||||
// Bytes arrived, so the server is reachable. This is
|
||||
// what clears the banner when a connection returns
|
||||
// while the user is simply scrolling, without waiting
|
||||
// for a probe or a manual retry.
|
||||
if ctl_cb
|
||||
.reachability
|
||||
.borrow_mut()
|
||||
.mark_reachable(std::time::Instant::now())
|
||||
// Bytes arrived *from the server*, so it is reachable.
|
||||
// This is what clears the banner when a connection
|
||||
// returns while the user is simply scrolling, without
|
||||
// waiting for a probe or a manual retry.
|
||||
//
|
||||
// Store hits are excluded deliberately: they are read
|
||||
// from local disk and say nothing about the network. A
|
||||
// window that is mostly cached delivers a run of them
|
||||
// before the first request is even attempted, so
|
||||
// counting them declared "back online" against a server
|
||||
// that was plainly down.
|
||||
if !t.from_cache
|
||||
&& ctl_cb
|
||||
.reachability
|
||||
.borrow_mut()
|
||||
.mark_reachable(std::time::Instant::now())
|
||||
{
|
||||
log::info!("back online");
|
||||
refresh_offline(&w, &ctl_cb);
|
||||
|
||||
Reference in New Issue
Block a user