[MM-62741] Fix loading screen flash between transitions (#3296)

This commit is contained in:
Devin Binnie
2025-01-28 08:09:53 -05:00
committed by GitHub
parent a4dcc020db
commit 8f151562b5

View File

@@ -73,7 +73,16 @@ export class LoadingScreen {
};
private create = () => {
this.view = new WebContentsView({webPreferences: {preload: getLocalPreload('internalAPI.js')}});
this.view = new WebContentsView({
webPreferences: {
preload: getLocalPreload('internalAPI.js'),
// For some reason this is required to make the background transparent
// for the loading screen, even though the docs say it's the default.
// See: https://www.electronjs.org/docs/latest/api/structures/web-preferences
transparent: true,
}},
);
performanceMonitor.registerView('LoadingScreen', this.view.webContents);
this.view.webContents.loadURL('mattermost-desktop://renderer/loadingScreen.html');
};