diff --git a/qml/pages/OverviewPage.qml b/qml/pages/OverviewPage.qml
index c658b3b..e3f9415 100644
--- a/qml/pages/OverviewPage.qml
+++ b/qml/pages/OverviewPage.qml
@@ -68,6 +68,14 @@ Page {
}
}
+ Timer {
+ id: openInitializationPageTimer
+ interval: 0
+ onTriggered: {
+ pageStack.push(Qt.resolvedUrl("../pages/InitializationPage.qml"));
+ }
+ }
+
function setPageStatus() {
switch (overviewPage.connectionState) {
case TelegramAPI.WaitingForNetwork:
@@ -102,19 +110,23 @@ Page {
function initializePage() {
overviewPage.authorizationState = tdLibWrapper.getAuthorizationState();
- overviewPage.handleAuthorizationState();
+ overviewPage.handleAuthorizationState(true);
overviewPage.connectionState = tdLibWrapper.getConnectionState();
overviewPage.setPageStatus();
}
- function handleAuthorizationState() {
+ function handleAuthorizationState(isOnInitialization) {
switch (overviewPage.authorizationState) {
case TelegramAPI.WaitPhoneNumber:
case TelegramAPI.WaitCode:
case TelegramAPI.WaitPassword:
case TelegramAPI.WaitRegistration:
overviewPage.loading = false;
- pageStack.push(Qt.resolvedUrl("../pages/InitializationPage.qml"));
+ if(isOnInitialization) { // pageStack isn't ready on Component.onCompleted
+ openInitializationPageTimer.start()
+ } else {
+ pageStack.push(Qt.resolvedUrl("../pages/InitializationPage.qml"));
+ }
break;
case TelegramAPI.AuthorizationReady:
overviewPage.loading = false;
diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp
index 5e96d91..2ea1c91 100644
--- a/src/tdlibwrapper.cpp
+++ b/src/tdlibwrapper.cpp
@@ -51,6 +51,7 @@ TDLibWrapper::TDLibWrapper(AppSettings *appSettings, MceInterface *mceInterface,
this->appSettings = appSettings;
this->mceInterface = mceInterface;
this->tdLibClient = td_json_client_create();
+ this->authorizationState = AuthorizationState::Closed;
this->tdLibReceiver = new TDLibReceiver(this->tdLibClient, this);
QString tdLibDatabaseDirectoryPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/tdlib";
diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts
index b54f71f..fcc33c8 100644
--- a/translations/harbour-fernschreiber-es.ts
+++ b/translations/harbour-fernschreiber-es.ts
@@ -1252,15 +1252,15 @@
-
+ Habilitar pantalla en notificaciones
-
+ Almacenamiento
-
+ Habilitar optimizador de almacenamiento