mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Make NotificationManager IInternalDisposableService (#1723)
Pull request merge order shenanigans.
This commit is contained in:
parent
e52c2755cb
commit
c709ad1811
1 changed files with 4 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ namespace Dalamud.Interface.ImGuiNotification.Internal;
|
||||||
/// <summary>Class handling notifications/toasts in ImGui.</summary>
|
/// <summary>Class handling notifications/toasts in ImGui.</summary>
|
||||||
[InterfaceVersion("1.0")]
|
[InterfaceVersion("1.0")]
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal class NotificationManager : INotificationManager, IServiceType, IDisposable
|
internal class NotificationManager : INotificationManager, IInternalDisposableService
|
||||||
{
|
{
|
||||||
[ServiceManager.ServiceDependency]
|
[ServiceManager.ServiceDependency]
|
||||||
private readonly GameGui gameGui = Service<GameGui>.Get();
|
private readonly GameGui gameGui = Service<GameGui>.Get();
|
||||||
|
|
@ -51,7 +51,7 @@ internal class NotificationManager : INotificationManager, IServiceType, IDispos
|
||||||
private IFontAtlas PrivateAtlas { get; }
|
private IFontAtlas PrivateAtlas { get; }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Dispose()
|
public void DisposeService()
|
||||||
{
|
{
|
||||||
this.PrivateAtlas.Dispose();
|
this.PrivateAtlas.Dispose();
|
||||||
foreach (var n in this.pendingNotifications)
|
foreach (var n in this.pendingNotifications)
|
||||||
|
|
@ -129,7 +129,7 @@ internal class NotificationManager : INotificationManager, IServiceType, IDispos
|
||||||
#pragma warning disable SA1015
|
#pragma warning disable SA1015
|
||||||
[ResolveVia<INotificationManager>]
|
[ResolveVia<INotificationManager>]
|
||||||
#pragma warning restore SA1015
|
#pragma warning restore SA1015
|
||||||
internal class NotificationManagerPluginScoped : INotificationManager, IServiceType, IDisposable
|
internal class NotificationManagerPluginScoped : INotificationManager, IInternalDisposableService
|
||||||
{
|
{
|
||||||
private readonly LocalPlugin localPlugin;
|
private readonly LocalPlugin localPlugin;
|
||||||
private readonly ConcurrentDictionary<IActiveNotification, int> notifications = new();
|
private readonly ConcurrentDictionary<IActiveNotification, int> notifications = new();
|
||||||
|
|
@ -151,7 +151,7 @@ internal class NotificationManagerPluginScoped : INotificationManager, IServiceT
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Dispose()
|
public void DisposeService()
|
||||||
{
|
{
|
||||||
while (!this.notifications.IsEmpty)
|
while (!this.notifications.IsEmpty)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue