瀏覽代碼

Merge pull request #10625 from ilovepilav/fix-alerts-missing-from-admin-dashboard

Fix: Plugin Installed Alerts missing from Admin Dashboard #10620
(cherry picked from commit 2f6536e34b2844c96033c3d7ee853f70d4a6351f)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Joshua M. Boniface 1 年之前
父節點
當前提交
c4cdcb73fc
共有 2 個文件被更改,包括 13 次插入3 次删除
  1. 4 0
      CONTRIBUTORS.md
  2. 9 3
      Emby.Server.Implementations/Updates/InstallationManager.cs

+ 4 - 0
CONTRIBUTORS.md

@@ -161,6 +161,7 @@
  - [MinecraftPlaye](https://github.com/MinecraftPlaye)
  - [RealGreenDragon](https://github.com/RealGreenDragon)
  - [TheTyrius](https://github.com/TheTyrius)
+ - [Çağrı Sakaoğlu](https://github.com/ilovepilav)
 
 # Emby Contributors
 
@@ -229,3 +230,6 @@
  - [gnuyent](https://github.com/gnuyent)
  - [Matthew Jones](https://github.com/matthew-jones-uk)
  - [Jakob Kukla](https://github.com/jakobkukla)
+ - [Utku Özdemir](https://github.com/utkuozdemir)
+ - [JPUC1143](https://github.com/Jpuc1143/)
+ - [0x25CBFC4F](https://github.com/0x25CBFC4F)

+ 9 - 3
Emby.Server.Implementations/Updates/InstallationManager.cs

@@ -324,9 +324,15 @@ namespace Emby.Server.Implementations.Updates
                 }
 
                 _completedInstallationsInternal.Add(package);
-                await _eventManager.PublishAsync(isUpdate
-                    ? (GenericEventArgs<InstallationInfo>)new PluginUpdatedEventArgs(package)
-                    : new PluginInstalledEventArgs(package)).ConfigureAwait(false);
+
+                if (isUpdate)
+                {
+                    await _eventManager.PublishAsync(new PluginUpdatedEventArgs(package)).ConfigureAwait(false);
+                }
+                else
+                {
+                    await _eventManager.PublishAsync(new PluginInstalledEventArgs(package)).ConfigureAwait(false);
+                }
 
                 _applicationHost.NotifyPendingRestart();
             }