Skip to content

Commit

Permalink
added delay before loading adding sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
prixt committed Feb 15, 2020
1 parent d9bce7f commit 302dc91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ Source at:
for ui_message in ui_rx.try_iter() {
match ui_message {
UIMessage::LoadedSoundpack(channel_names) => {
std::thread::sleep(std::time::Duration::from_millis(500));
clear_sliders(&mut webview);
for name in channel_names.iter() {
add_slider(&mut webview, name)
}
remove_alert(&mut webview, "loading_soundpack");
add_alert(&mut webview, "soundpack_loaded", "green", "✔️ Soundpack loaded!");
add_alert(&mut webview, "soundpack_loaded", "green", "✔ Soundpack loaded!");
}
UIMessage::LoadedVolumeSettings(entries) => {
for (name, volume) in entries.into_iter() {
Expand All @@ -188,11 +189,11 @@ Source at:
}
UIMessage::LoadedGamelog => {
remove_alert(&mut webview, "loading_gamelog");
add_alert(&mut webview, "gamelog_loaded", "green", "✔️ Gamelog loaded!");
add_alert(&mut webview, "gamelog_loaded", "green", "✔ Gamelog loaded!");
}
UIMessage::LoadedIgnoreList => {
remove_alert(&mut webview, "loading_ignore");
add_alert(&mut webview, "ignore_loaded", "green", "✔️ Ignore list loaded!");
add_alert(&mut webview, "ignore_loaded", "green", "✔ Ignore list loaded!");
}
}
}
Expand Down

0 comments on commit 302dc91

Please sign in to comment.