Open Bug 1880678 Opened 1 year ago Updated 1 year ago

Implement an initial UIController module to handle global variables

Categories

(Thunderbird :: Mail Window Front End, task, P2)

Tracking

(thunderbird_esr115 wontfix)

ASSIGNED
Tracking Status
thunderbird_esr115 --- wontfix

People

(Reporter: aleca, Assigned: aleca)

Details

Attachments

(1 file)

We have a lot of instances of globally scoped variables that are defined in one file and we use them, reassign them, release them, and so on, in multiple files.
It makes it impossible to guarantee a single source of truth and avoid sketchy solutions like reaching inside a window from another window to use those variables.
We should implement a generic UIController module which holds a singleton with the current always correct state of those variables, making them actually global and safe to use.

Purpose of this implementation
Start implementing a single UIController singleton that holds the correct reference of gFolder.
All files and implementations should use that singleton to get and set that gFolder in order to
guarantee always the correct state.

With this we can avoid passing that variable around by importing the same file, or assuming that
that file is available in the current window, and other not great paradigms.

Assignee: nobody → alessandro
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: