Page MenuHomePhabricator

[desktop] Fix error when trying to maximize after closing the window
ClosedPublic

Authored by michal on Dec 14 2022, 10:22 AM.
Tags
None
Referenced Files
F2015816: D5868.id19403.diff
Fri, Jun 14, 11:28 PM
Unknown Object (File)
Thu, May 30, 9:22 PM
Unknown Object (File)
Fri, May 24, 6:29 PM
Unknown Object (File)
Fri, May 24, 6:29 PM
Unknown Object (File)
Fri, May 24, 6:29 PM
Unknown Object (File)
Mar 28 2024, 2:14 AM
Unknown Object (File)
Mar 28 2024, 2:14 AM
Unknown Object (File)
Mar 28 2024, 2:13 AM
Subscribers

Details

Summary

Fixes the bug in ENG-2450. If you closed a window and opened a new one, double-clicking on the top bar caused an error.

The issue was that after closing the window (but not the whole app), the callbacks weren't cleared and had references to the (now closed) window.

This diff:

  • unregisters 'clear-history' and 'double-click-top-bar' after the window is closed
  • moves the 'set-badge' callback outside of the window creation because it only uses the global app, and was duplicated with every new window unnecessarily
Test Plan
  • Start application
  • Close the window (without closing the app)
  • Open a new window and double click the top bar

Without this diff the error is shown. With this diff, no error is shown and error is correctly displayed.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage