mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Do not cache has-selection in diff view js
This commit is contained in:
parent
8f86a7bc6d
commit
f3fa97864a
|
@ -166,20 +166,13 @@ function has_class(e, cls)
|
|||
return e.classList.contains(cls);
|
||||
}
|
||||
|
||||
var has_selection = false;
|
||||
|
||||
function update_has_selection()
|
||||
{
|
||||
var selection = document.querySelectorAll('tr.added.selected, tr.removed.selected');
|
||||
var hs = (selection.length != 0);
|
||||
|
||||
if (hs != has_selection)
|
||||
{
|
||||
has_selection = hs;
|
||||
|
||||
var v = has_selection ? "yes" : "no";
|
||||
xhr_get('internal', {action: 'selection-changed', value: v});
|
||||
}
|
||||
var v = hs ? "yes" : "no";
|
||||
xhr_get('internal', {action: 'selection-changed', value: v});
|
||||
}
|
||||
|
||||
function prepare_patchset(filediv)
|
||||
|
|
Loading…
Reference in a new issue