Skip to content

Commit

Permalink
fix: small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
markettes committed Jul 20, 2023
1 parent 0650215 commit 90a2d13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
11 changes: 1 addition & 10 deletions src/Data/Models/Channel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,7 @@ public enum ChannelStatus
public bool IsPrivate { get; set; }

[NotMapped]
public int? OpenedWithId
{
get
{
if (ChannelOperationRequests != null && ChannelOperationRequests.Count > 0)
return ChannelOperationRequests.FirstOrDefault().Wallet.Id;
else
return null;
}
}
public int? OpenedWithId => ChannelOperationRequests?.FirstOrDefault()?.Wallet?.Id;

#region Relationships

Expand Down
10 changes: 1 addition & 9 deletions src/Pages/Channels.razor
Original file line number Diff line number Diff line change
Expand Up @@ -717,16 +717,8 @@

private bool OnWalletFilter(object itemValue, object searchValue)
{
if (searchValue == null || (int)searchValue == 0)
{
return true;
}
if (itemValue == null) return false;
if ((int)itemValue == (int)searchValue)
{
return true;
}
return false;
return searchValue == null || (int)searchValue == 0 || (int)itemValue == (int)searchValue;
}

private bool OnSourceNodeIdFilter(object itemValue, object searchValue)
Expand Down

0 comments on commit 90a2d13

Please sign in to comment.