mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: only log exception in popup task (#1281)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
4bc5b90e6b
commit
eae6d10784
2 changed files with 17 additions and 8 deletions
|
@ -100,23 +100,32 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public async void ProcessPopup()
|
||||
{
|
||||
if (_popup is { InProgress: false })
|
||||
if (_popup is { InProgress: false } dump)
|
||||
{
|
||||
if (!_popup.Check())
|
||||
if (!dump.Check())
|
||||
return;
|
||||
|
||||
_popup.InProgress = true;
|
||||
var task = _popup.Sure();
|
||||
dump.InProgress = true;
|
||||
var task = dump.Sure();
|
||||
var finished = false;
|
||||
if (task != null)
|
||||
{
|
||||
var finished = await task;
|
||||
_popup.InProgress = false;
|
||||
try
|
||||
{
|
||||
finished = await task;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
App.LogException(e);
|
||||
}
|
||||
|
||||
dump.InProgress = false;
|
||||
if (finished)
|
||||
Popup = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_popup.InProgress = false;
|
||||
dump.InProgress = false;
|
||||
Popup = null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue