From 7706ef1fa7d743f6f3893324d39a5508df201b12 Mon Sep 17 00:00:00 2001 From: Keda Date: Mon, 29 Sep 2025 02:10:03 +0200 Subject: [PATCH] Hotfix 0.1.9.1 - Update API & Double notification & Update Penumbra API Ref --- MareAPI | 2 +- MareSynchronos/MarePlugin.cs | 2 ++ MareSynchronos/MareSynchronos.csproj | 2 +- MareSynchronos/Services/Mediator/Messages.cs | 2 +- .../Services/SyncDefaultsService.cs | 20 +++++++++++++---- MareSynchronos/UI/ChangelogUi.cs | 12 ++++++++-- MareSynchronos/UI/CompactUI.cs | 16 +++----------- MareSynchronos/UI/SettingsUi.cs | 22 ++++++++++++++++--- Penumbra.Api | 2 +- 9 files changed, 54 insertions(+), 26 deletions(-) diff --git a/MareAPI b/MareAPI index 3b17590..5fc7969 160000 --- a/MareAPI +++ b/MareAPI @@ -1 +1 @@ -Subproject commit 3b175900c10a9a152a168b1bd6fee390aa58e8e0 +Subproject commit 5fc7969adfddf29566945c9f8d30f12cf5c9449c diff --git a/MareSynchronos/MarePlugin.cs b/MareSynchronos/MarePlugin.cs index d7bf86d..3024cf2 100644 --- a/MareSynchronos/MarePlugin.cs +++ b/MareSynchronos/MarePlugin.cs @@ -5,6 +5,7 @@ using MareSynchronos.PlayerData.Services; using MareSynchronos.Services; using MareSynchronos.Services.Mediator; using MareSynchronos.Services.ServerConfiguration; +using MareSynchronos.Interop; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; @@ -152,6 +153,7 @@ public class MarePlugin : MediatorSubscriberBase, IHostedService _runtimeServiceScope.ServiceProvider.GetRequiredService(); _runtimeServiceScope.ServiceProvider.GetRequiredService(); _runtimeServiceScope.ServiceProvider.GetRequiredService(); + _runtimeServiceScope.ServiceProvider.GetRequiredService(); _runtimeServiceScope.ServiceProvider.GetRequiredService(); #if !DEBUG diff --git a/MareSynchronos/MareSynchronos.csproj b/MareSynchronos/MareSynchronos.csproj index 52c6119..9b969dd 100644 --- a/MareSynchronos/MareSynchronos.csproj +++ b/MareSynchronos/MareSynchronos.csproj @@ -3,7 +3,7 @@ UmbraSync UmbraSync - 0.1.9.0 + 0.1.9.1 diff --git a/MareSynchronos/Services/Mediator/Messages.cs b/MareSynchronos/Services/Mediator/Messages.cs index 28c6b50..cb68774 100644 --- a/MareSynchronos/Services/Mediator/Messages.cs +++ b/MareSynchronos/Services/Mediator/Messages.cs @@ -117,7 +117,7 @@ public record NearbyDetectionToggled(bool Enabled) : MessageBase; public record AllowPairRequestsToggled(bool Enabled) : MessageBase; public record ApplyDefaultPairPermissionsMessage(UserPairDto Pair) : MessageBase; public record ApplyDefaultGroupPermissionsMessage(GroupPairFullInfoDto GroupPair) : MessageBase; -public record ApplyDefaultsToAllSyncsMessage : MessageBase; +public record ApplyDefaultsToAllSyncsMessage(string? Context = null, bool? Disabled = null) : MessageBase; public record PairSyncOverrideChanged(string Uid, bool? DisableSounds, bool? DisableAnimations, bool? DisableVfx) : MessageBase; public record GroupSyncOverrideChanged(string Gid, bool? DisableSounds, bool? DisableAnimations, bool? DisableVfx) : MessageBase; diff --git a/MareSynchronos/Services/SyncDefaultsService.cs b/MareSynchronos/Services/SyncDefaultsService.cs index c1a8e39..48a95c9 100644 --- a/MareSynchronos/Services/SyncDefaultsService.cs +++ b/MareSynchronos/Services/SyncDefaultsService.cs @@ -33,7 +33,7 @@ public sealed class SyncDefaultsService : DisposableMediatorSubscriberBase Mediator.Subscribe(this, OnApplyPairDefaults); Mediator.Subscribe(this, OnApplyGroupDefaults); - Mediator.Subscribe(this, _ => ApplyDefaultsToAll()); + Mediator.Subscribe(this, msg => ApplyDefaultsToAll(msg)); Mediator.Subscribe(this, OnPairOverrideChanged); Mediator.Subscribe(this, OnGroupOverrideChanged); } @@ -63,7 +63,7 @@ public sealed class SyncDefaultsService : DisposableMediatorSubscriberBase _ = _apiController.GroupChangeIndividualPermissionState(new GroupPairUserPermissionDto(message.GroupPair.Group, message.GroupPair.User, permissions)); } - private async Task ApplyDefaultsToAllAsync() + private async Task ApplyDefaultsToAllAsync(ApplyDefaultsToAllSyncsMessage message) { try { @@ -107,7 +107,10 @@ public sealed class SyncDefaultsService : DisposableMediatorSubscriberBase } } - Mediator.Publish(new DualNotificationMessage("Préférences appliquées", BuildSummaryMessage(updatedPairs, updatedGroups), NotificationType.Info)); + var summary = BuildSummaryMessage(updatedPairs, updatedGroups); + var primary = BuildPrimaryMessage(message); + var combined = string.IsNullOrEmpty(primary) ? summary : string.Concat(primary, ' ', summary); + Mediator.Publish(new DualNotificationMessage("Préférences appliquées", combined, NotificationType.Info)); } catch (Exception ex) { @@ -116,7 +119,16 @@ public sealed class SyncDefaultsService : DisposableMediatorSubscriberBase } } - private void ApplyDefaultsToAll() => _ = ApplyDefaultsToAllAsync(); + private void ApplyDefaultsToAll(ApplyDefaultsToAllSyncsMessage message) => _ = ApplyDefaultsToAllAsync(message); + + private static string? BuildPrimaryMessage(ApplyDefaultsToAllSyncsMessage message) + { + if (string.IsNullOrEmpty(message.Context) || message.Disabled == null) + return null; + + var state = message.Disabled.Value ? "désactivée" : "activée"; + return $"Synchronisation {message.Context} par défaut {state}."; + } private static string BuildSummaryMessage(int pairs, int groups) { diff --git a/MareSynchronos/UI/ChangelogUi.cs b/MareSynchronos/UI/ChangelogUi.cs index 1706970..dc8c74c 100644 --- a/MareSynchronos/UI/ChangelogUi.cs +++ b/MareSynchronos/UI/ChangelogUi.cs @@ -169,11 +169,19 @@ public sealed class ChangelogUi : WindowMediatorSubscriberBase { return new List { + new(new Version(0, 1, 9, 1), "0.1.9.1", new List + { + new("Début correctif pour la bulle de frappe."), + new("Les bascules de synchronisation n'affichent plus qu'une seule notification résumée."), + + }), new(new Version(0, 1, 9, 0), "0.1.9.0", new List { new("Il est désormais possible de configurer par défaut nos choix de synchronisation (VFX, Music, Animation)."), - new("La catégorie 'En attente' ne s'affice uniquement que si une invitation est en attente"), - new("(EN PRÉ VERSION) Il est désormais possible de voir quand une personne appairé est en train d'écrire avec une bulle qui s'affiche."), + new("La catégorie 'En attente' ne s'affiche uniquement que si une invitation est en attente"), + new("(EN PRÉ VERSION) Il est désormais possible de voir quand une personne appairée est en train d'écrire avec une bulle qui s'affiche."), + new("(EN PRÉ VERSION) La bulle de frappe s'affiche également sur votre propre plaque de nom lorsque vous écrivez."), + new("Les bascules de synchronisation n'affichent plus qu'une seule notification résumée."), new("Correctif : Désormais, les invitation entrantes ne s'affichent qu'une seule fois au lieu de deux."), }), new(new Version(0, 1, 8, 2), "0.1.8.2", new List diff --git a/MareSynchronos/UI/CompactUI.cs b/MareSynchronos/UI/CompactUI.cs index d343a1c..fbd78d0 100644 --- a/MareSynchronos/UI/CompactUI.cs +++ b/MareSynchronos/UI/CompactUI.cs @@ -294,8 +294,7 @@ public class CompactUi : WindowMediatorSubscriberBase { _configService.Current.DefaultDisableSounds = state; _configService.Save(); - PublishSyncDefaultNotification(soundSubject, state); - Mediator.Publish(new ApplyDefaultsToAllSyncsMessage()); + Mediator.Publish(new ApplyDefaultsToAllSyncsMessage(soundSubject, state)); }, () => DisableStateTooltip(soundSubject, _configService.Current.DefaultDisableSounds)); @@ -304,8 +303,7 @@ public class CompactUi : WindowMediatorSubscriberBase { _configService.Current.DefaultDisableAnimations = state; _configService.Save(); - PublishSyncDefaultNotification(animSubject, state); - Mediator.Publish(new ApplyDefaultsToAllSyncsMessage()); + Mediator.Publish(new ApplyDefaultsToAllSyncsMessage(animSubject, state)); }, () => DisableStateTooltip(animSubject, _configService.Current.DefaultDisableAnimations), spacing); @@ -314,8 +312,7 @@ public class CompactUi : WindowMediatorSubscriberBase { _configService.Current.DefaultDisableVfx = state; _configService.Save(); - PublishSyncDefaultNotification(vfxSubject, state); - Mediator.Publish(new ApplyDefaultsToAllSyncsMessage()); + Mediator.Publish(new ApplyDefaultsToAllSyncsMessage(vfxSubject, state)); }, () => DisableStateTooltip(vfxSubject, _configService.Current.DefaultDisableVfx), spacing); @@ -355,13 +352,6 @@ public class CompactUi : WindowMediatorSubscriberBase return $"Synchronisation {context} par défaut : {state}.\nCliquez pour modifier."; } - private void PublishSyncDefaultNotification(string context, bool disabled) - { - var state = disabled ? "désactivée" : "activée"; - var message = $"Synchronisation {context} par défaut {state}."; - Mediator.Publish(new DualNotificationMessage("Préférence de synchronisation", message, NotificationType.Info)); - } - private void DrawAddCharacter() { ImGui.Dummy(new(10)); diff --git a/MareSynchronos/UI/SettingsUi.cs b/MareSynchronos/UI/SettingsUi.cs index a3a0a8e..5cada1e 100644 --- a/MareSynchronos/UI/SettingsUi.cs +++ b/MareSynchronos/UI/SettingsUi.cs @@ -1086,7 +1086,9 @@ public class SettingsUi : WindowMediatorSubscriberBase var useNameColors = _configService.Current.UseNameColors; var nameColors = _configService.Current.NameColors; var autoPausedNameColors = _configService.Current.BlockedNameColors; - if (ImGui.Checkbox("Color nameplates of paired players", ref useNameColors)) + var typingIndicatorNameplates = _configService.Current.TypingIndicatorShowOnNameplates; + var typingIndicatorPartyList = _configService.Current.TypingIndicatorShowOnPartyList; + if (ImGui.Checkbox("Coloriser les plaques de nom des paires", ref useNameColors)) { _configService.Current.UseNameColors = useNameColors; _configService.Save(); @@ -1096,7 +1098,7 @@ public class SettingsUi : WindowMediatorSubscriberBase using (ImRaii.Disabled(!useNameColors)) { using var indent = ImRaii.PushIndent(); - if (InputDtrColors("Character Name Color", ref nameColors)) + if (InputDtrColors("Couleur du nom", ref nameColors)) { _configService.Current.NameColors = nameColors; _configService.Save(); @@ -1105,7 +1107,7 @@ public class SettingsUi : WindowMediatorSubscriberBase ImGui.SameLine(); - if (InputDtrColors("Blocked Character Color", ref autoPausedNameColors)) + if (InputDtrColors("Couleur des noms bloqués", ref autoPausedNameColors)) { _configService.Current.BlockedNameColors = autoPausedNameColors; _configService.Save(); @@ -1113,6 +1115,20 @@ public class SettingsUi : WindowMediatorSubscriberBase } } + if (ImGui.Checkbox("Afficher la bulle de frappe sur les plaques", ref typingIndicatorNameplates)) + { + _configService.Current.TypingIndicatorShowOnNameplates = typingIndicatorNameplates; + _configService.Save(); + } + _uiShared.DrawHelpText("Ajoute une bulle '...' sur la plaque des paires en train d'écrire."); + + if (ImGui.Checkbox("Tracer la frappe dans la liste de groupe", ref typingIndicatorPartyList)) + { + _configService.Current.TypingIndicatorShowOnPartyList = typingIndicatorPartyList; + _configService.Save(); + } + _uiShared.DrawHelpText("Consigne dans les journaux quand une paire du groupe est en train d'écrire (bulle visuelle ultérieure)."); + if (ImGui.Checkbox("Show separate Visible group", ref showVisibleSeparate)) { _configService.Current.ShowVisibleUsersSeparately = showVisibleSeparate; diff --git a/Penumbra.Api b/Penumbra.Api index dd14131..648b6fc 160000 --- a/Penumbra.Api +++ b/Penumbra.Api @@ -1 +1 @@ -Subproject commit dd14131793e5ae47cc8e9232f46469216017b5aa +Subproject commit 648b6fc2ce600a95ab2b2ced27e1639af2b04502