Procházet zdrojové kódy

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] před 1 měsícem
rodič
revize
e3b7b96122

+ 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)
     {