From d91f98e131dbfd5b5e7b0a8915b1630e9f7205af Mon Sep 17 00:00:00 2001 From: MatrikMoon <5924350+MatrikMoon@users.noreply.github.com> Date: Mon, 25 Jan 2021 02:50:15 -0600 Subject: [PATCH] Updated publish configurations, fixed team scrolling, fixed event page null reference --- .../EventSelectionCoordinator.cs | 2 +- .../UI/ViewControllers/TeamSelection.cs | 6 ++++++ .../Properties/PublishProfiles/Linux.pubxml | 17 +++++++++++++++++ .../PublishProfiles/Linux.pubxml.user | 6 ++++++ .../Properties/PublishProfiles/Windows.pubxml | 18 ++++++++++++++++++ .../PublishProfiles/Windows.pubxml.user | 6 ++++++ .../TournamentAssistantCore.csproj | 2 +- TournamentAssistantUI/UI/MatchPage.xaml.cs | 4 +++- 8 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml create mode 100644 TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml.user create mode 100644 TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml create mode 100644 TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml.user diff --git a/TournamentAssistant/UI/FlowCoordinators/EventSelectionCoordinator.cs b/TournamentAssistant/UI/FlowCoordinators/EventSelectionCoordinator.cs index 5be462d1..f7c0c2c2 100644 --- a/TournamentAssistant/UI/FlowCoordinators/EventSelectionCoordinator.cs +++ b/TournamentAssistant/UI/FlowCoordinators/EventSelectionCoordinator.cs @@ -61,7 +61,7 @@ private void UpdateScrapeCount(int count, int total) private void itemSelection_ItemSelected(ListItem item) { - var eventHostPair = ScrapedInfo.First(x => x.Value.Events.Any(y => $"{y.EventId}" == item.Identifier)); + var eventHostPair = ScrapedInfo.Where(x => x.Value.Events != null).First(x => x.Value.Events.Any(y => $"{y.EventId}" == item.Identifier)); _qualifierCoordinator = BeatSaberUI.CreateFlowCoordinator(); _qualifierCoordinator.DidFinishEvent += qualifierCoordinator_DidFinishEvent; _qualifierCoordinator.Event = eventHostPair.Value.Events.First(x => $"{x.EventId}" == item.Identifier); diff --git a/TournamentAssistant/UI/ViewControllers/TeamSelection.cs b/TournamentAssistant/UI/ViewControllers/TeamSelection.cs index d42893ae..5d130022 100644 --- a/TournamentAssistant/UI/ViewControllers/TeamSelection.cs +++ b/TournamentAssistant/UI/ViewControllers/TeamSelection.cs @@ -53,5 +53,11 @@ private void TeamClicked(TableView sender, TeamListItem teamListItem) { TeamSelected?.Invoke(teamListItem.team); } + + [UIAction("#post-parse")] + private void PostParse() + { + teamList?.tableView.ReloadData(); + } } } diff --git a/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml b/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml new file mode 100644 index 00000000..62ee6631 --- /dev/null +++ b/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml @@ -0,0 +1,17 @@ + + + + + Release + Any CPU + bin\Release\publish\linux\ + FileSystem + netcoreapp3.1 + linux-x64 + true + True + False + + \ No newline at end of file diff --git a/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml.user b/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml.user new file mode 100644 index 00000000..312c6e3b --- /dev/null +++ b/TournamentAssistantCore/Properties/PublishProfiles/Linux.pubxml.user @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml b/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml new file mode 100644 index 00000000..9180784a --- /dev/null +++ b/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml @@ -0,0 +1,18 @@ + + + + + Release + Any CPU + bin\Release\publish\windows\ + FileSystem + netcoreapp3.1 + win-x64 + true + True + False + False + + \ No newline at end of file diff --git a/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml.user b/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml.user new file mode 100644 index 00000000..312c6e3b --- /dev/null +++ b/TournamentAssistantCore/Properties/PublishProfiles/Windows.pubxml.user @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/TournamentAssistantCore/TournamentAssistantCore.csproj b/TournamentAssistantCore/TournamentAssistantCore.csproj index 14752dee..d391b141 100644 --- a/TournamentAssistantCore/TournamentAssistantCore.csproj +++ b/TournamentAssistantCore/TournamentAssistantCore.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp3.1 + netcoreapp3.0 Linux diff --git a/TournamentAssistantUI/UI/MatchPage.xaml.cs b/TournamentAssistantUI/UI/MatchPage.xaml.cs index 1cc94ea9..a676fe68 100644 --- a/TournamentAssistantUI/UI/MatchPage.xaml.cs +++ b/TournamentAssistantUI/UI/MatchPage.xaml.cs @@ -241,7 +241,9 @@ private void Connection_MatchDeleted(Match deletedMatch) private void LoadSong_Executed(object obj) { SongLoading = true; - var songId = GetSongIdFromUrl(SongUrlBox.Text) ?? OstHelper.allLevels.First(x => x.Value == SongUrlBox.Text).Key; + + //TODO: This got swapped around backwards somehow + var songId = OstHelper.allLevels.FirstOrDefault(x => x.Value == SongUrlBox.Text).Key ?? GetSongIdFromUrl(SongUrlBox.Text); //var customHost = string.IsNullOrWhiteSpace(CustomSongHostBox.Text) ? null : CustomSongHostBox.Text; string customHost = null;