mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement show_with_delay option
This commit is contained in:
parent
0912f2c68d
commit
a336b18ac3
5 changed files with 51 additions and 9 deletions
|
|
@ -29,7 +29,7 @@ use gtk::{
|
|||
Box,
|
||||
};
|
||||
use sqlite::Transaction;
|
||||
use std::{cell::RefCell, sync::Arc};
|
||||
use std::{cell::RefCell, sync::Arc, time::Duration};
|
||||
|
||||
pub struct Page {
|
||||
id: GString,
|
||||
|
|
@ -548,7 +548,8 @@ impl Page {
|
|||
// Final image size unknown, show loading widget
|
||||
let status = content.set_status_loading(
|
||||
Some(&"Loading.."),
|
||||
None
|
||||
None,
|
||||
Some(Duration::from_secs(1)) // show if download time > 1 second
|
||||
);
|
||||
|
||||
// Asynchronously move `InputStream` data from `SocketConnection` into the local `MemoryInputStream`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue