Fix mode cancel check
This commit is contained in:
parent
81dd9810da
commit
190c1d7e40
1 changed files with 15 additions and 4 deletions
|
@ -16,10 +16,21 @@ 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))
|
||||
return;
|
||||
|
||||
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) {
|
||||
view_show_spinner(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue