diff --git a/qml/pages/OverviewPage.qml b/qml/pages/OverviewPage.qml index 17c4f32..a1435d3 100644 --- a/qml/pages/OverviewPage.qml +++ b/qml/pages/OverviewPage.qml @@ -162,6 +162,7 @@ Page { } break; case TelegramAPI.AuthorizationReady: + loadingBusyIndicator.text = qsTr("Loading chat list..."); overviewPage.loading = false; overviewPage.initializationCompleted = true; overviewPage.updateContent(); @@ -176,6 +177,7 @@ Page { overviewPage.loading = false; chatListCreatedTimer.stop(); updateSecondaryContentTimer.stop(); + loadingBusyIndicator.text = qsTr("Logging out") overviewPage.logoutLoading = true; chatListModel.reset(); break; @@ -368,34 +370,12 @@ Page { spacing: Theme.paddingMedium anchors.verticalCenter: chatListView.verticalCenter - opacity: overviewPage.chatListCreated ? 0 : 1 + opacity: overviewPage.chatListCreated && !overviewPage.logoutLoading ? 0 : 1 Behavior on opacity { FadeAnimation {} } - visible: !overviewPage.chatListCreated && !overviewPage.logoutLoading - - InfoLabel { - id: loadingLabel - text: qsTr("Loading chat list...") - } - - BusyIndicator { - id: loadingBusyIndicator - anchors.horizontalCenter: parent.horizontalCenter - running: !overviewPage.chatListCreated - size: BusyIndicatorSize.Large - } - } - - Column { - width: parent.width - spacing: Theme.paddingMedium - anchors.verticalCenter: chatListView.verticalCenter - - opacity: overviewPage.logoutLoading ? 1 : 0 - Behavior on opacity { FadeAnimation {} } - visible: overviewPage.logoutLoading + visible: !overviewPage.chatListCreated || overviewPage.logoutLoading BusyLabel { - text: qsTr("Logging out") + id: loadingBusyIndicator running: true } } diff --git a/src/tdlibwrapper.cpp b/src/tdlibwrapper.cpp index 9ad3a99..577e625 100644 --- a/src/tdlibwrapper.cpp +++ b/src/tdlibwrapper.cpp @@ -1300,7 +1300,7 @@ void TDLibWrapper::handleAuthorizationStateChanged(const QString &authorizationS } td_json_client_destroy(this->tdLibClient); this->tdLibReceiver->terminate(); - QDir appPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.local/share/harbour-fernschreiber"); + QDir appPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)); appPath.removeRecursively(); this->tdLibClient = td_json_client_create(); initializeTDLibReciever();