Make NotificationManager IInternalDisposableService (#1723)

Pull request merge order shenanigans.
This commit is contained in:
srkizer 2024-03-17 04:44:10 +09:00 committed by GitHub
parent e52c2755cb
commit c709ad1811
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ namespace Dalamud.Interface.ImGuiNotification.Internal;
/// <summary>Class handling notifications/toasts in ImGui.</summary>
[InterfaceVersion("1.0")]
[ServiceManager.EarlyLoadedService]
internal class NotificationManager : INotificationManager, IServiceType, IDisposable
internal class NotificationManager : INotificationManager, IInternalDisposableService
{
[ServiceManager.ServiceDependency]
private readonly GameGui gameGui = Service<GameGui>.Get();
@ -51,7 +51,7 @@ internal class NotificationManager : INotificationManager, IServiceType, IDispos
private IFontAtlas PrivateAtlas { get; }
/// <inheritdoc/>
public void Dispose()
public void DisposeService()
{
this.PrivateAtlas.Dispose();
foreach (var n in this.pendingNotifications)
@ -129,7 +129,7 @@ internal class NotificationManager : INotificationManager, IServiceType, IDispos
#pragma warning disable SA1015
[ResolveVia<INotificationManager>]
#pragma warning restore SA1015
internal class NotificationManagerPluginScoped : INotificationManager, IServiceType, IDisposable
internal class NotificationManagerPluginScoped : INotificationManager, IInternalDisposableService
{
private readonly LocalPlugin localPlugin;
private readonly ConcurrentDictionary<IActiveNotification, int> notifications = new();
@ -151,7 +151,7 @@ internal class NotificationManagerPluginScoped : INotificationManager, IServiceT
}
/// <inheritdoc/>
public void Dispose()
public void DisposeService()
{
while (!this.notifications.IsEmpty)
{