Skip to content

Commit 1d556bd

Browse files
authored
Override Equals method to compare RadioSongItem
1 parent 1bc397b commit 1d556bd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

WolvenKit.App/ViewModels/Dialogs/AddRadioExtFilesDialogViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ public RadioSongItem(string filePath, int index = 0)
2626

2727
public override string ToString() => $"{Index:D2} - {FilePath}";
2828

29-
public override bool Equals(object? obj) => base.Equals(obj);
30-
31-
protected bool Equals(RadioSongItem other) => FilePath == other.FilePath;
29+
public override bool Equals(object? obj) => obj is RadioSongItem other && FilePath == other.FilePath;
3230

3331
public override int GetHashCode() => FilePath.GetHashCode();
3432
}

0 commit comments

Comments
 (0)