diff --git a/LightlessSync/Services/Mediator/Messages.cs b/LightlessSync/Services/Mediator/Messages.cs index 343075c..7f4698d 100644 --- a/LightlessSync/Services/Mediator/Messages.cs +++ b/LightlessSync/Services/Mediator/Messages.cs @@ -107,7 +107,8 @@ public record GPoseLobbyReceiveWorldData(UserData UserData, WorldData WorldData) public record OpenCharaDataHubWithFilterMessage(UserData UserData) : MessageBase; public record EnableBroadcastMessage(string HashedCid, bool Enabled) : MessageBase; public record BroadcastStatusChangedMessage(bool Enabled, TimeSpan? Ttl) : MessageBase; -public record UserLeftSyncshellReloadFinderUi(bool hasLeft, string gid) : MessageBase; +public record UserLeftSyncshell(string gid) : MessageBase; +public record UserJoinedSyncshell(string gid) : MessageBase; public record SyncshellBroadcastsUpdatedMessage : MessageBase; public record PairRequestReceivedMessage(string HashedCid, string Message) : MessageBase; public record PairRequestsUpdatedMessage : MessageBase; diff --git a/LightlessSync/UI/Components/DrawFolderGroup.cs b/LightlessSync/UI/Components/DrawFolderGroup.cs index ac146eb..4135d54 100644 --- a/LightlessSync/UI/Components/DrawFolderGroup.cs +++ b/LightlessSync/UI/Components/DrawFolderGroup.cs @@ -111,7 +111,7 @@ public class DrawFolderGroup : DrawFolderBase if (_uiSharedService.IconTextButton(FontAwesomeIcon.ArrowCircleLeft, "Leave Syncshell", menuWidth, true) && UiSharedService.CtrlPressed()) { _ = _apiController.GroupLeave(_groupFullInfoDto); - _lightlessMediator.Publish(new UserLeftSyncshellReloadFinderUi(hasLeft: true, _groupFullInfoDto.GID)); + _lightlessMediator.Publish(new UserLeftSyncshell(_groupFullInfoDto.GID)); ImGui.CloseCurrentPopup(); } UiSharedService.AttachToolTip("Hold CTRL and click to leave this Syncshell" + (!string.Equals(_groupFullInfoDto.OwnerUID, _apiController.UID, StringComparison.Ordinal) diff --git a/LightlessSync/UI/JoinSyncshellUI.cs b/LightlessSync/UI/JoinSyncshellUI.cs index ffa4e23..989fa07 100644 --- a/LightlessSync/UI/JoinSyncshellUI.cs +++ b/LightlessSync/UI/JoinSyncshellUI.cs @@ -173,6 +173,7 @@ internal class JoinSyncshellUI : WindowMediatorSubscriberBase joinPermissions.SetDisableAnimations(_ownPermissions.DisableGroupAnimations); joinPermissions.SetDisableVFX(_ownPermissions.DisableGroupVFX); _ = _apiController.GroupJoinFinalize(new GroupJoinDto(_groupJoinInfo.Group, _previousPassword, joinPermissions)); + Mediator.Publish(new UserJoinedSyncshell(_groupJoinInfo.Group.GID)); IsOpen = false; } } diff --git a/LightlessSync/UI/SyncshellFinderUI.cs b/LightlessSync/UI/SyncshellFinderUI.cs index 2187a3f..b26644f 100644 --- a/LightlessSync/UI/SyncshellFinderUI.cs +++ b/LightlessSync/UI/SyncshellFinderUI.cs @@ -68,7 +68,8 @@ public class SyncshellFinderUI : WindowMediatorSubscriberBase Mediator.Subscribe(this, async _ => await RefreshSyncshellsAsync().ConfigureAwait(false)); Mediator.Subscribe(this, async _ => await RefreshSyncshellsAsync().ConfigureAwait(false)); - Mediator.Subscribe(this, async _ => await RefreshSyncshellsAsync(_.gid).ConfigureAwait(false)); + Mediator.Subscribe(this, async _ => await RefreshSyncshellsAsync(_.gid).ConfigureAwait(false)); + Mediator.Subscribe(this, async _ => await RefreshSyncshellsAsync(_.gid).ConfigureAwait(false)); } public override async void OnOpen() @@ -404,12 +405,9 @@ public class SyncshellFinderUI : WindowMediatorSubscriberBase } else { - using (ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("DimRed"))) + using (ImRaii.Disabled()) { - using (ImRaii.Disabled()) - { - ImGui.Button(label, buttonSize); - } + ImGui.Button(label, buttonSize); } UiSharedService.AttachToolTip("Already a member or owner of this Syncshell.");