Merge lp:~pkunal-parmar/ubuntu-calendar-app/UrlInvocation into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Kunal Parmar
Approved revision: 629
Merged at revision: 697
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/UrlInvocation
Merge into: lp:ubuntu-calendar-app
Diff against target: 62 lines (+33/-8)
1 file modified
calendar.qml (+33/-8)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/UrlInvocation
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Bartosz Kosiorek (community) Approve
Mihir Soni Pending
Review via email: mp+255234@code.launchpad.net

Commit message

resolves 1426519

handing the invocation from URL

Description of the change

resolves 1426519

handing the invocation from URL

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Bernabei (faenil) wrote :

code comment added

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :
Revision history for this message
Andrea Bernabei (faenil) :
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Hi Andrea, Your comment was very helpful.

Now I modified the code, can you have a another look.

Thanks

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Bernabei (faenil) wrote :

minor comments from me, looks good otherwise, thanks :)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

It is working perfectly for me.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Thanks Gang65,

Seems like some issue with AP, I will have a look and try to fix it.

628. By Kunal Parmar

merge from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

AP fails does not seem like regression from this MR, but not sure why testcases are failing ramdomly

629. By Kunal Parmar

test

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'calendar.qml'
2--- calendar.qml 2015-01-22 20:07:30 +0000
3+++ calendar.qml 2015-07-18 01:29:50 +0000
4@@ -95,6 +95,21 @@
5 footerColor: "#ECECEC"
6 anchorToKeyboard: true
7
8+ Connections {
9+ target: UriHandler
10+ onOpened: {
11+ var uri = uris[0]
12+ if(uri !== undefined && url != "") {
13+ var commands = uri.split("://")[1].split("=");
14+ if(commands[0].toLowerCase() === "eventid") {
15+ // calendar://eventid=??
16+ if( eventModel ) {
17+ eventModel.showEventFromId(commands[1]);
18+ }
19+ }
20+ }
21+ }
22+ }
23
24 PageStack {
25 id: pageStack
26@@ -168,18 +183,28 @@
27 collectionFilter.ids = collectionIds;
28 }
29
30+ function showEventFromId(eventId) {
31+ if(eventId === undefined || eventId === "") {
32+ return;
33+ }
34+
35+ var requestId = "";
36+ var callbackFunc = function(id,fetchedItems) {
37+ if( requestId === id && fetchedItems.length > 0 ) {
38+ pageStack.push(Qt.resolvedUrl("EventDetails.qml"),{"event":fetchedItems[0],"model": eventModel});
39+ }
40+ eventModel.onItemsFetched.disconnect( callbackFunc );
41+ }
42+
43+ eventModel.onItemsFetched.connect( callbackFunc );
44+ requestId = eventModel.fetchItems(eventId);
45+ }
46+
47 Component.onCompleted: {
48 delayedApplyFilter();
49
50 if (args.values.eventid) {
51- var requestId = "";
52- eventModel.onItemsFetched.connect( function(id,fetchedItems) {
53- if( requestId === id && fetchedItems.length > 0 ) {
54- var event = fetchedItems[0];
55- pageStack.push(Qt.resolvedUrl("EventDetails.qml"),{"event":event,"model": eventModel});
56- }
57- });
58- requestId = eventModel.fetchItems([args.values.eventid]);
59+ showEventFromId(args.values.eventid);
60 }
61 }
62 }

Subscribers

People subscribed via source and target branches

to status/vote changes: