mirror of
https://github.com/status-im/status-app.git
synced 2026-08-27 15:11:20 +00:00
Part of #21462 Introduces a separate shell-ready signal so password login can transition from onboarding to `AppMain` before the main module finishes loading. It tracks full initialization through `mainReady`, defers several module-dependent stores and services, adds null-safe bindings and placeholder data, and only marks the application fully ready once `mainLoaded` is received.
49 lines
1.4 KiB
QML
49 lines
1.4 KiB
QML
import QtQml
|
|
import QtQuick
|
|
|
|
import StatusQ
|
|
|
|
import shared.stores as SharedStores
|
|
|
|
import AppLayouts.stores as AppStores
|
|
import AppLayouts.Profile.stores as ProfileStores
|
|
|
|
Loader {
|
|
id: root
|
|
|
|
required property AppStores.FeatureFlagsStore featureFlagsStore
|
|
required property ProfileStores.LanguageStore languageStore
|
|
required property Keychain keychain
|
|
required property bool systemTrayIconAvailable
|
|
|
|
property SharedStores.UtilsStore utilsStore
|
|
property bool mainReady: false
|
|
|
|
function loadSection() {
|
|
if (!root.active)
|
|
return
|
|
if (root.source === QmlCompiler.appMainUrl)
|
|
return
|
|
setSource(QmlCompiler.appMainUrl, {
|
|
objectName: "appMain",
|
|
featureFlagsStore: Qt.binding(() => root.featureFlagsStore),
|
|
languageStore: Qt.binding(() => root.languageStore),
|
|
keychain: Qt.binding(() => root.keychain),
|
|
utilsStore: Qt.binding(() => root.utilsStore),
|
|
systemTrayIconAvailable:Qt.binding(() => root.systemTrayIconAvailable),
|
|
mainReady: Qt.binding(() => root.mainReady),
|
|
})
|
|
}
|
|
|
|
onActiveChanged: {
|
|
if (root.active) {
|
|
loadSection()
|
|
return
|
|
}
|
|
}
|
|
|
|
onMainReadyChanged: loadSection()
|
|
|
|
Component.onCompleted: QmlCompiler.precompile(QmlCompiler.appMainUrl, false)
|
|
}
|