mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-08 02:34:06 +02:00
Ninja fix deadlock when exiting after update
This commit is contained in:
parent
3a28556c7f
commit
67a2e40622
@ -244,11 +244,14 @@ private void updates_UpdateAccepted(object sender, UpdateAcceptedEventArgs e){
|
||||
downloadForm.MoveToCenter(this);
|
||||
downloadForm.ShowDialog();
|
||||
|
||||
if (downloadForm.UpdateStatus == FormUpdateDownload.Status.Succeeded){
|
||||
FormUpdateDownload.Status status = downloadForm.UpdateStatus;
|
||||
downloadForm.Dispose();
|
||||
|
||||
if (status == FormUpdateDownload.Status.Succeeded){
|
||||
UpdateInstallerPath = downloadForm.InstallerPath;
|
||||
ForceClose();
|
||||
}
|
||||
else if (downloadForm.UpdateStatus == FormUpdateDownload.Status.Manual){
|
||||
else if (status == FormUpdateDownload.Status.Manual){
|
||||
ForceClose();
|
||||
}
|
||||
else{
|
||||
|
@ -67,12 +67,12 @@ public int Check(bool force){
|
||||
|
||||
private void TriggerUpdateAcceptedEvent(UpdateAcceptedEventArgs args){
|
||||
if (UpdateAccepted != null){
|
||||
form.InvokeSafe(() => UpdateAccepted(this, args));
|
||||
form.InvokeAsyncSafe(() => UpdateAccepted(this, args));
|
||||
}
|
||||
}
|
||||
|
||||
private void TriggerUpdateDismissedEvent(UpdateDismissedEventArgs args){
|
||||
form.InvokeSafe(() => {
|
||||
form.InvokeAsyncSafe(() => {
|
||||
settings.DismissedUpdate = args.VersionTag;
|
||||
|
||||
if (UpdateDismissed != null){
|
||||
@ -83,7 +83,7 @@ private void TriggerUpdateDismissedEvent(UpdateDismissedEventArgs args){
|
||||
|
||||
private void TriggerCheckFinishedEvent(UpdateCheckEventArgs args){
|
||||
if (CheckFinished != null){
|
||||
form.InvokeSafe(() => CheckFinished(this, args));
|
||||
form.InvokeAsyncSafe(() => CheckFinished(this, args));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user