mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
wait for toaster ready, hopefully fix file browser patch
This commit is contained in:
@@ -15,6 +15,7 @@ class Toaster extends Logger {
|
||||
private instanceRetPatch?: Patch;
|
||||
private node: any;
|
||||
private settingsModule: any;
|
||||
private ready: boolean = false;
|
||||
|
||||
constructor() {
|
||||
super('Toaster');
|
||||
@@ -72,9 +73,13 @@ class Toaster extends Logger {
|
||||
};
|
||||
this.node.stateNode.forceUpdate();
|
||||
this.log('Initialized');
|
||||
this.ready = true;
|
||||
}
|
||||
|
||||
toast(toast: ToastData) {
|
||||
async toast(toast: ToastData) {
|
||||
while (!this.ready) {
|
||||
await sleep(100);
|
||||
}
|
||||
const settings = this.settingsModule.settings;
|
||||
let toastData = {
|
||||
nNotificationID: window.NotificationStore.m_nNextTestNotificationID++,
|
||||
|
||||
Reference in New Issue
Block a user