web: more caching fixes
This commit is contained in:
parent
add261dd01
commit
d9d293901b
2 changed files with 10 additions and 5 deletions
|
@ -60,7 +60,6 @@ function view_timeline_apply_mode(model, mode, opts={}) {
|
|||
count++;
|
||||
}
|
||||
if (count > 0) {
|
||||
find_node("#view .loading-events").classList.add("hide");
|
||||
el.append(fragment);
|
||||
view_set_show_count(0);
|
||||
view_timeline_update_timestamps();
|
||||
|
@ -69,6 +68,10 @@ function view_timeline_apply_mode(model, mode, opts={}) {
|
|||
return mode;
|
||||
}
|
||||
|
||||
function view_show_spinner(show=true) {
|
||||
find_node("#view .loading-events").classList.toggle("hide", !show);
|
||||
}
|
||||
|
||||
/* view_timeline_update iterates through invalidated event ids and either adds
|
||||
* or removes them from the timeline.
|
||||
*/
|
||||
|
@ -114,7 +117,7 @@ function view_timeline_update(model) {
|
|||
// If we have things to show and we have initted and we don't have
|
||||
// anything update the current view
|
||||
if (!latest_ev && model.inited) {
|
||||
view_timeline_show_new(model);
|
||||
view_timeline_show_new(model);
|
||||
}
|
||||
view_set_show_count(count, true, !model.inited);
|
||||
}
|
||||
|
@ -156,7 +159,6 @@ function view_timeline_show_new(model) {
|
|||
count++;
|
||||
}
|
||||
if (count > 0) {
|
||||
find_node("#view .loading-events").classList.add("hide");
|
||||
el.prepend(fragment);
|
||||
}
|
||||
view_set_show_count(-count, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue