Fix mode cancel check

This commit is contained in:
Thomas Mathews 2023-01-05 16:55:48 -08:00
parent 81dd9810da
commit 190c1d7e40

View file

@ -16,10 +16,21 @@ function view_timeline_apply_mode(model, mode, opts={}) {
const now = new Date().getTime(); const now = new Date().getTime();
// Don't do anything if we are already here // Don't do anything if we are already here
if (el.dataset.mode == mode && (el.dataset.pubkey == opts.pubkey || if (el.dataset.mode == mode) {
el.dataset.threadId == thread_id)) switch (mode) {
return; case VM_USER:
if (el.dataset.pubkey == opts.pubkey)
return;
break;
case VM_THREAD:
if (el.dataset.threadId == thread_id)
return;
break;
default:
return;
}
}
// Fetch history for certain views // Fetch history for certain views
if (mode == VM_THREAD) { if (mode == VM_THREAD) {
view_show_spinner(true); view_show_spinner(true);