Skip to content

Commit

Permalink
v 0.2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksailer committed May 14, 2018
1 parent 7e97e0d commit 06d1a2d
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 26 deletions.
38 changes: 38 additions & 0 deletions depecher/qml/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
14 changes: 10 additions & 4 deletions depecher/qml/pages/components/authorization/SignInDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -67,6 +71,11 @@ Dialog {
target: keyColumn
visible:true
}
PropertyChanges {
target: signin
visible:false
}

PropertyChanges {
target: pulleyMenuRecovery
visible:true
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions depecher/rpm/depecher.changes.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

# * date Author's Name <author's email> version-release
# - Summary of changes
* Mon May 15 2018 Ivan Chernenky <blacksailer@yandex.ru> 0.0.2-2
- Notification error fixed (onupdateOutbox)
- sign in column fixed

* Sun May 14 2018 Ivan Chernenky <blacksailer@yandex.ru> 0.0.2-1
- Notification sound configured
- Zoom Photos Added
Expand Down
2 changes: 1 addition & 1 deletion depecher/rpm/depecher.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tdlibjson_wrapper/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------

tdlibQt/include/AppApiInfo.hpp
*~
*.autosave
*.a
Expand Down
12 changes: 1 addition & 11 deletions tdlibjson_wrapper/tdlibQt/NotificationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
9 changes: 0 additions & 9 deletions tdlibjson_wrapper/tdlibQt/include/AppApiInfo.hpp

This file was deleted.

0 comments on commit 06d1a2d

Please sign in to comment.