Skip to content

Commit

Permalink
Disallow deleting Desktop-type Applications
Browse files Browse the repository at this point in the history
  • Loading branch information
AJLeuer committed Mar 5, 2021
1 parent 4df4b56 commit 9d305b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion GHelper/GHelper/ViewModel/ApplicationViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ private void HandleProfileSetActiveForApplication(ProfileViewModel profileWithCh
}
}
}

public override void FireDeletedEvent()
{
if (this.Application is not DesktopApplication)
{
base.FireDeletedEvent();
}
}

[NotifyPropertyChangedInvocator]
protected override void OnPropertyChanged([CallerMemberName] string? propertyName = null)
Expand Down Expand Up @@ -267,7 +275,7 @@ private static ApplicationViewModel CreateApplicationViewModelForApplicationMode
}
}

public enum InstallState
public enum InstallState
{
Installed,
NotInstalled
Expand Down
2 changes: 1 addition & 1 deletion GHelper/GHelper/ViewModel/GHubRecordViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void FireSaveEvent()
UserSaved?.Invoke();
}

public void FireDeletedEvent()
public virtual void FireDeletedEvent()
{
UserDeletedRecord?.Invoke(this);
}
Expand Down

0 comments on commit 9d305b0

Please sign in to comment.