mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Correctly update selection when clearing diff
This commit is contained in:
parent
a1ec2c72dc
commit
21909908d1
|
@ -173,7 +173,6 @@ function update_has_selection()
|
|||
has_selection = hs;
|
||||
|
||||
var v = has_selection ? "yes" : "no";
|
||||
|
||||
xhr_get('internal', {action: 'selection-changed', value: v});
|
||||
}
|
||||
}
|
||||
|
@ -333,8 +332,6 @@ function xhr_get(action, data, onload)
|
|||
|
||||
function update_diff(id, lsettings)
|
||||
{
|
||||
current_diff = id;
|
||||
|
||||
if (html_builder_worker)
|
||||
{
|
||||
html_builder_worker.terminate();
|
||||
|
@ -345,9 +342,12 @@ function update_diff(id, lsettings)
|
|||
if (typeof id == 'undefined')
|
||||
{
|
||||
content.empty();
|
||||
update_has_selection();
|
||||
return;
|
||||
}
|
||||
|
||||
current_diff = id;
|
||||
|
||||
if (typeof lsettings != 'undefined')
|
||||
{
|
||||
$.extend(settings, lsettings);
|
||||
|
@ -375,6 +375,8 @@ function update_diff(id, lsettings)
|
|||
' + settings.strings.loading_diff + '\
|
||||
</div>\
|
||||
');
|
||||
|
||||
update_has_selection();
|
||||
}
|
||||
|
||||
html_builder_progress_timeout = 0;
|
||||
|
@ -401,6 +403,7 @@ function update_diff(id, lsettings)
|
|||
}
|
||||
|
||||
content.html(event.data.diff_html);
|
||||
update_has_selection();
|
||||
|
||||
$(".expander").click(expand_collapse);
|
||||
|
||||
|
|
Loading…
Reference in a new issue