Skip to content

Commit

Permalink
refactor: simplity setIcon logic
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-is-cute committed Mar 21, 2024
1 parent 3572b73 commit 25921da
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Ui/NotificationProgressManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ private State UpdateNotif(IActiveNotification notif, DownloadTask task) {
var sData = task.StateData;
var sMax = task.StateDataMax;

var setIcon = true;
if (this.LastSeenState.TryGetValue(task.TaskId, out var lastState) && lastState == state) {
setIcon = false;
}

var setIcon = !(this.LastSeenState.TryGetValue(task.TaskId, out var lastState) && lastState == state);
if (setIcon && this.GetStateIcon(state) is { } icon) {
notif.SetIconTexture(icon);
}
Expand Down

0 comments on commit 25921da

Please sign in to comment.