Merge lp:~cellsoftware/telegram-app/1599030 into lp:telegram-app

Proposed by Ash
Status: Merged
Approved by: Jin
Approved revision: 221
Merged at revision: 222
Proposed branch: lp:~cellsoftware/telegram-app/1599030
Merge into: lp:telegram-app
Diff against target: 73 lines (+13/-4)
4 files modified
telegram/app/qml/AccountDialogList.qml (+7/-2)
telegram/app/qml/AccountMessageList.qml (+1/-0)
telegram/app/qml/AccountPage.qml (+0/-2)
telegram/app/qml/telegram.qml (+5/-0)
To merge this branch: bzr merge lp:~cellsoftware/telegram-app/1599030
Reviewer Review Type Date Requested Status
Jin (community) Approve
libqtelegram team Pending
Review via email: mp+299781@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jin (jindallo) wrote :

Code looks good,
I will approve after verified pass locally.

Revision history for this message
Jin (jindallo) wrote :

Hello Ash,

It verified failed from my local,
I follow below steps:
    a) Launch Telegram app
    b) Put the app into background
    c) Send group messages from other clients
    d) Click the notification on Ubuntu Touch unity panel
    e) Telegram set the dialog focused but does not enter the dialog window properly

Could you please have a check on above scenario?
Many thanks.

review: Needs Fixing
Revision history for this message
Jin (jindallo) wrote :

More information here:
If does not launch the application or the process is killed,
the behavior looks fine after step d),
which means it can lead users to see the dialog after notification pressed.

Revision history for this message
Ash (ashley-richards) wrote :

Hi Jin,
I have had a look into the steps you provided however I do not see any issues with the fix. It always presents the correct dialog chat window from push notification, the Touch utility panel both with the app being backgrounded and closed..

Did you preform the tests on Tablet?
Could you clarify what you mean by step e.? "..does not enter dialog window"?
Could you clarify what you mean below "More infomation here:"

Thanks

Revision history for this message
Jin (jindallo) wrote :

Hello Ash,

After .cache and .cache/QML/App/com.ubuntu.telegram* deleted,
I re-installed the app. on my phone and still has below findings:
    1. the app. is closed
    - leads user to the proper dialog window after notification pressed (OK)
    - then click back key on dialog window returns to main view but the chat is focused
      (this will be a regression of bug: 1576027)
    2. the app. is in the background as main view (AccountListPage)
    - No leads user to the dialog window, it keeps the page as main view (NG)
    3. the app. is in the background as the same dialog window (AccountDialogPage)
    - leads user to the proper dialog window after notification pressed (OK)
    4. the app. is in the background as the different dialog window (AccountDialogPage)
    - it shows a "Please select chat" broken page (NG)

Above "same" means in the dialog you are talking to the person who send you the messages,
and the "different" means the person who send you the messages is different with the one you are talking to.

review: Needs Fixing
220. By Ash

Fixed issues Jin experianced

221. By Ash

Removed console logs

Revision history for this message
Jin (jindallo) wrote :

Problem solved,
the code looks good and verified pass locally on phone/tablet,
so I approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'telegram/app/qml/AccountDialogList.qml'
2--- telegram/app/qml/AccountDialogList.qml 2016-06-27 09:40:33 +0000
3+++ telegram/app/qml/AccountDialogList.qml 2016-07-19 15:18:28 +0000
4@@ -41,9 +41,14 @@
5
6 onDialogClosed: {
7 if(mainView.width <= units.gu(80)) {
8- if (userTapBackHome == true) {
9+ if (userTapBackHome) {
10 dialog_list.currentIndex = -1;
11- currentDialog = telegramObject.nullDialog;
12+
13+ if (!userTappedNotification) {
14+ currentDialog = telegramObject.nullDialog;
15+ } else {
16+ userTappedNotification = false;
17+ }
18 } else {
19 userTapBackHome = true;
20 }
21
22=== modified file 'telegram/app/qml/AccountMessageList.qml'
23--- telegram/app/qml/AccountMessageList.qml 2016-07-08 08:44:25 +0000
24+++ telegram/app/qml/AccountMessageList.qml 2016-07-19 15:18:28 +0000
25@@ -54,6 +54,7 @@
26 onIsActiveChanged: {
27 if( isActive )
28 messages_model.setReaded()
29+ userTappedNotification = false;
30 }
31
32 onCurrentDialogChanged: {
33
34=== modified file 'telegram/app/qml/AccountPage.qml'
35--- telegram/app/qml/AccountPage.qml 2016-06-24 14:42:41 +0000
36+++ telegram/app/qml/AccountPage.qml 2016-07-19 15:18:28 +0000
37@@ -19,8 +19,6 @@
38 property alias telegramObject: dialogs.telegramObject
39 property alias currentDialog: dialogs.currentDialog
40
41- property bool userTapBackHome: true
42-
43 signal openDialog(var dialogId)
44 signal addParticipantRequest()
45
46
47=== modified file 'telegram/app/qml/telegram.qml'
48--- telegram/app/qml/telegram.qml 2016-06-08 13:58:16 +0000
49+++ telegram/app/qml/telegram.qml 2016-07-19 15:18:28 +0000
50@@ -54,6 +54,9 @@
51 property var uri: undefined
52 property int chatToOpen: 0
53
54+ property bool userTapBackHome: true
55+ property bool userTappedNotification: false
56+
57 signal error(int id, string errorCode, string errorText)
58 signal pushLoaded()
59 signal pushRegister(string token, string version)
60@@ -121,11 +124,13 @@
61 // TODO: Temporarily open no chats if secret notification pressed.
62 } else {
63 console.info("Setting chat to open: " + chatId);
64+ userTappedNotification = true;
65 backToDialogsPage();
66 mainView.chatToOpen = chatId;
67 mainView.uri = undefined;
68 }
69 case "launch": // no-i18n
70+ //userTapBackHome = true;
71 // Nothing to do.
72 break;
73 default: console.warn("Unmanaged URI! " + commands);

Subscribers

People subscribed via source and target branches

to status/vote changes: