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,9 +16,20 @@ function view_timeline_apply_mode(model, mode, opts={}) {
const now = new Date().getTime();
// Don't do anything if we are already here
if (el.dataset.mode == mode && (el.dataset.pubkey == opts.pubkey ||
el.dataset.threadId == thread_id))
if (el.dataset.mode == mode) {
switch (mode) {
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
if (mode == VM_THREAD) {