From 542e7e98e97ed112313ec6df22179226846c75e5 Mon Sep 17 00:00:00 2001 From: Christopher - RtF <58520035+christopher-rtf@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:07:16 -0400 Subject: [PATCH 01/59] Remove vestigial 'CommunityPickerWindow' and related strings --- Morphic.Client/Bar/BarManager.cs | 45 ++----------------- .../Dialogs/CommunityPickerWindow.xaml | 35 --------------- .../Dialogs/CommunityPickerWindow.xaml.cs | 43 ------------------ .../Localization/StringResources.es.xaml | 4 -- .../Localization/StringResources.xaml | 4 -- 5 files changed, 4 insertions(+), 127 deletions(-) delete mode 100644 Morphic.Client/Dialogs/CommunityPickerWindow.xaml delete mode 100644 Morphic.Client/Dialogs/CommunityPickerWindow.xaml.cs diff --git a/Morphic.Client/Bar/BarManager.cs b/Morphic.Client/Bar/BarManager.cs index 09db53e3..de164212 100644 --- a/Morphic.Client/Bar/BarManager.cs +++ b/Morphic.Client/Bar/BarManager.cs @@ -273,47 +273,10 @@ public async Task LoadSessionBarAsync(MorphicSession session, string communityId UserCommunity? community = null; UserBar? userBar = null; - //if (session.Communities.Length == 0) - //{ - // MessageBox.Show("You are not part of a Morphic community yet.", "Morphic"); - //} - //else if (session.Communities.Length == 1) - //{ - // community = session.Communities.First(); - //} - //else - //{ - // The user is a member of multiple communities. - - //// See if any membership has changed - //bool changed = session.Communities.Length != lastCommunities.Length - // || !session.Communities.Select(c => c.Id).OrderBy(id => id) - // .SequenceEqual(lastCommunities.OrderBy(id => id)); - - if (/*!changed &&*/ communityId is not null) - { - community = session.Communities.FirstOrDefault(c => c.Id == communityId); - } - - //if (community is null) - //{ - // this.Logger.LogInformation("Showing community picker"); - - // // Load the bars while the picker is shown - // Dictionary> bars = - // session.Communities.ToDictionary(c => c.Id, c => session.GetBar(c.Id)); - - // // Show the picker - // CommunityPickerWindow picker = new CommunityPickerWindow(session.Communities); - // bool gotCommunity = picker.ShowDialog() == true; - // community = gotCommunity ? picker.SelectedCommunity : null; - - // if (community is not null) - // { - // userBar = await bars[community.Id]; - // } - //} - //} + if (/*!changed &&*/ communityId is not null) + { + community = session.Communities.FirstOrDefault(c => c.Id == communityId); + } if (community is not null) { diff --git a/Morphic.Client/Dialogs/CommunityPickerWindow.xaml b/Morphic.Client/Dialogs/CommunityPickerWindow.xaml deleted file mode 100644 index dfdae05b..00000000 --- a/Morphic.Client/Dialogs/CommunityPickerWindow.xaml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -