Skip to content

Commit

Permalink
fix loading battles with undefined names
Browse files Browse the repository at this point in the history
  • Loading branch information
JimGeersinga committed Nov 6, 2024
1 parent c739497 commit 1bcaac0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="maui-package-name-placeholder" Publisher="CN=JimG" Version="1.9.10.0" />
<Identity Name="maui-package-name-placeholder" Publisher="CN=JimG" Version="1.9.11.0" />

<mp:PhoneIdentity PhoneProductId="3DAE7680-3F65-440F-908F-252D648F20FC" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
12 changes: 7 additions & 5 deletions NED.WoT.BattleResults.Client/Services/TankNameResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,11 @@ public static class TankNameResolver

public static string GetTankName(string key)
{
if (string.IsNullOrWhiteSpace(key))
{
return key;
}

string strippedKey = key[(key.IndexOf(':') + 1)..];
if (_tankNames.TryGetValue(strippedKey, out var name))
{
Expand All @@ -1476,11 +1481,8 @@ public static string GetTankName(string key)
{
return name;
}

if (!string.IsNullOrWhiteSpace(key))
{
UndefinedTankNames.Add(key);
}

UndefinedTankNames.Add(key);

return key;
}
Expand Down
3 changes: 3 additions & 0 deletions NED.WoT.BattleResults.Client/Shared/ClanMembersDialog.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<MudDialog>
<TitleContent>
<MudText Typo="Typo.h6">Clan leden (@GetClanMembers().Count())</MudText>
</TitleContent>
<DialogContent>
<MudTable Items="@GetClanMembers()" Hover="true" Breakpoint="Breakpoint.Sm" FixedHeader="true" Dense="false" Height="600px" Bordered="false">
<HeaderContent>
Expand Down

0 comments on commit 1bcaac0

Please sign in to comment.