node tests: Avoid rewiring client_is_active.

This commit is contained in:
Steve Howell
2021-05-18 19:29:06 +00:00
committed by Steve Howell
parent 7a3ba26c78
commit 7a9d0a505d
2 changed files with 17 additions and 10 deletions

View File

@@ -76,7 +76,7 @@ export function update_dom_with_unread_counts(counts) {
}
}
function mark_client_idle() {
export function mark_client_idle() {
// When we become idle, we don't immediately send anything to the
// server; instead, we wait for our next periodic update, since
// this data is fundamentally not timely.
@@ -210,7 +210,8 @@ export function send_presence_to_server(want_redraw) {
});
}
function mark_client_active() {
export function mark_client_active() {
// exported for testing
if (!client_is_active) {
client_is_active = true;
send_presence_to_server(false);