I started refactoring the GUI with classes, for now only popups (Alert, Prompt, QRAlert).
Also gui.popups module keeps track of all active popups that we can close with close_all_popups function.
This will be required for USB communication - if a request is coming from the host we want to close all popups and open a single one triggered by the host. Otherwise host could spam us with requests and exhaust our memory with large number of popups.
I started refactoring the GUI with classes, for now only popups (
Alert
,Prompt
,QRAlert
). Alsogui.popups
module keeps track of all active popups that we can close withclose_all_popups
function.This will be required for USB communication - if a request is coming from the host we want to close all popups and open a single one triggered by the host. Otherwise host could spam us with requests and exhaust our memory with large number of popups.