Skip to content

Commit d3b4541

Browse files
committed
fix: binding diagnostics warnings
Signed-off-by: leo <[email protected]>
1 parent 1f4ec10 commit d3b4541

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ViewModels/CommitDetail.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ await Commands.SaveRevisionFile
291291

292292
private void Refresh()
293293
{
294-
_changes = null;
294+
_changes = [];
295295
_requestingRevisionFiles = false;
296296
_revisionFiles = null;
297297

@@ -426,9 +426,6 @@ private void Refresh()
426426

427427
private void RefreshVisibleChanges()
428428
{
429-
if (_changes == null)
430-
return;
431-
432429
if (string.IsNullOrEmpty(_searchChangeFilter))
433430
{
434431
VisibleChanges = _changes;
@@ -578,8 +575,8 @@ private async Task SetViewingCommitAsync(Models.Object file)
578575
private Models.CommitFullMessage _fullMessage = null;
579576
private Models.CommitSignInfo _signInfo = null;
580577
private List<string> _children = null;
581-
private List<Models.Change> _changes = null;
582-
private List<Models.Change> _visibleChanges = null;
578+
private List<Models.Change> _changes = [];
579+
private List<Models.Change> _visibleChanges = [];
583580
private List<Models.Change> _selectedChanges = null;
584581
private string _searchChangeFilter = string.Empty;
585582
private DiffContext _diffContext = null;

0 commit comments

Comments
 (0)