diff --git a/depecher/qml/js/utils.js b/depecher/qml/js/utils.js index b3f5e464..49d15534 100644 --- a/depecher/qml/js/utils.js +++ b/depecher/qml/js/utils.js @@ -15,3 +15,41 @@ function setState(state) { } } +function setAuthState(state) { +/* + AuthorizationStateWaitTdlibParameters, + AuthorizationStateWaitEncryptionKey, + AuthorizationStateWaitPhoneNumber, + AuthorizationStateWaitCode, + AuthorizationStateWaitPassword, + AuthorizationStateLoggingOut, + AuthorizationStateClosing, + AuthorizationStateClosed, + AuthorizationStateReady + + */ + switch(state){ + case 0: + return qsTr("Waiting for network") + case 1: + return qsTr("Wait lib parameters") + case 2: + return qsTr("Wait encryption key") + case 3: + return qsTr("Wait phone number") + case 4: + return qsTr("Wait code") + case 5: + return qsTr("Wait password") + case 6: + return qsTr("Wait logging out") + case 7: + return qsTr("Wait closing") + case 8: + return qsTr("Wait closed") + case 8: + return qsTr("Ready") + default: + return qsTr("Uknown") + } +} diff --git a/depecher/qml/pages/components/authorization/SignInDialog.qml b/depecher/qml/pages/components/authorization/SignInDialog.qml index 3db349e0..8b2ebe3d 100644 --- a/depecher/qml/pages/components/authorization/SignInDialog.qml +++ b/depecher/qml/pages/components/authorization/SignInDialog.qml @@ -58,6 +58,10 @@ Dialog { onClicked: hintLabel.visible = true } } + PageHeader { + title: state == "code" ? qsTr("Enter code") : qsTr("Enter password") + description: qsTr("Authentication state") +" - "+setAuthState(telegramAuthenticationHandler.currentAuthorizationState) + } states:[ State { @@ -67,6 +71,11 @@ Dialog { target: keyColumn visible:true } + PropertyChanges { + target: signin + visible:false + } + PropertyChanges { target: pulleyMenuRecovery visible:true @@ -90,7 +99,6 @@ Dialog { topPadding:(signInDialog.height - imglock.height - lblInfoPass.height - tfPassword.height - hintLabel.height - btnpassword.height - 4 * spacing)/2 width: parent.width-2*x visible: false - PageHeader { width: parent.width; height: Theme.paddingLarge } Image { id: imglock source: "image://theme/icon-m-device-lock" @@ -139,9 +147,7 @@ Dialog { x:Theme.horizontalPageMargin width: parent.width-2*x topPadding:(signInDialog.height - imgwaiting.height - lblinfo.height - tfcode.height - tfRowName.height - btnsignin.height - 4 * spacing)/2 - visible: false - PageHeader { width: parent.width; height: Theme.paddingLarge } - + visible: true Image { id: imgwaiting source: "image://theme/icon-l-timer" diff --git a/depecher/rpm/depecher.changes.in b/depecher/rpm/depecher.changes.in index e1571eee..41f72860 100644 --- a/depecher/rpm/depecher.changes.in +++ b/depecher/rpm/depecher.changes.in @@ -7,6 +7,10 @@ # * date Author's Name version-release # - Summary of changes +* Mon May 15 2018 Ivan Chernenky 0.0.2-2 +- Notification error fixed (onupdateOutbox) +- sign in column fixed + * Sun May 14 2018 Ivan Chernenky 0.0.2-1 - Notification sound configured - Zoom Photos Added diff --git a/depecher/rpm/depecher.yaml b/depecher/rpm/depecher.yaml index 1026e879..33f97298 100644 --- a/depecher/rpm/depecher.yaml +++ b/depecher/rpm/depecher.yaml @@ -1,7 +1,7 @@ Name: depecher Summary: Telegram client for Sailfish OS Version: 0.2 -Release: 1 +Release: 2 # The contents of the Group field should be one of the groups listed here: # http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS Group: Applications/Communications diff --git a/tdlibjson_wrapper/.gitignore b/tdlibjson_wrapper/.gitignore index fab7372d..bb7cce69 100644 --- a/tdlibjson_wrapper/.gitignore +++ b/tdlibjson_wrapper/.gitignore @@ -1,6 +1,6 @@ # This file is used to ignore files which are generated # ---------------------------------------------------------------------------- - +tdlibQt/include/AppApiInfo.hpp *~ *.autosave *.a diff --git a/tdlibjson_wrapper/tdlibQt/NotificationManager.cpp b/tdlibjson_wrapper/tdlibQt/NotificationManager.cpp index 334cff71..93345242 100644 --- a/tdlibjson_wrapper/tdlibQt/NotificationManager.cpp +++ b/tdlibjson_wrapper/tdlibQt/NotificationManager.cpp @@ -74,17 +74,7 @@ void NotificationManager::getUpdateChatOutbox(const QJsonObject &chatReadOutbox) qint64 chat_id = ParseObject::getInt64(chatReadOutbox["chat_id"]); qint64 last_message_id = ParseObject::getInt64(chatReadOutbox["last_read_outbox_message_id"]); if (m_chatIdsPublished.contains(chat_id)) { - int i = 0; - for (; i < m_chatIdsPublished[chat_id]->remoteActions().size(); i++) { - QVariantMap item = m_chatIdsPublished[chat_id]->remoteActions().at(i).toMap(); - if (item["name"].toString() == "telegram_message_id") - break; - } - - if (m_chatIdsPublished[chat_id]->remoteActions().at( - i).toMap()["displayName"].toString().toLongLong() < - last_message_id) - removeNotification(chat_id); + removeNotification(chat_id); } } diff --git a/tdlibjson_wrapper/tdlibQt/include/AppApiInfo.hpp b/tdlibjson_wrapper/tdlibQt/include/AppApiInfo.hpp deleted file mode 100644 index d4080ce1..00000000 --- a/tdlibjson_wrapper/tdlibQt/include/AppApiInfo.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef APPAPIINFO_HPP -#define APPAPIINFO_HPP -#include - -namespace tdlibQt { -static const QString appid = QStringLiteral("10721"); - static const QString apphash = QStringLiteral("aa0838770e243a5fd092ce402f2c288d"); -} //namespace tdlibQt -#endif // APPAPIINFO_HPP