1. Merged "Loading Chat Lists" and "Logging Out" BusyIndicator to one
2. Use QT in-built API to get the application storage location rather than hardcoding the path when clearing tdlib files
This commit is contained in:
parent
de9112cc8a
commit
f471ef2683
2 changed files with 6 additions and 26 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue