Browse Source

Address code review feedback

- Update RaiseInitializedChanged documentation to clarify it delegates to static event
- Pass ApplicationImpl.Instance as sender in legacy Init path instead of null for consistency
- All tests still passing

Co-authored-by: tig <[email protected]>
copilot-swe-agent[bot] 1 month ago
parent
commit
fa27fb28c2
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Terminal.Gui/App/Application.Lifecycle.cs
  2. 1 1
      Terminal.Gui/App/ApplicationImpl.cs

+ 1 - 1
Terminal.Gui/App/Application.Lifecycle.cs

@@ -158,7 +158,7 @@ public static partial class Application // Lifecycle (Init/Shutdown)
         bool init = Initialized = true;
         
         // Raise InitializedChanged event
-        OnInitializedChanged (null, new (init));
+        OnInitializedChanged (ApplicationImpl.Instance, new (init));
     }
 
     internal static void SubscribeDriverEvents ()

+ 1 - 1
Terminal.Gui/App/ApplicationImpl.cs

@@ -205,7 +205,7 @@ public class ApplicationImpl : IApplication
     }
 
     /// <summary>
-    /// Internal helper to raise InitializedChanged event. Used by legacy Init path and modern Init path.
+    /// Internal helper to raise InitializedChanged static event. Used by both legacy and modern Init paths.
     /// </summary>
     internal void RaiseInitializedChanged (bool initialized)
     {