Merge lp:~unity-api-team/unity8/scopes-active-depends-on-screen into lp:unity8

Proposed by Pete Woods
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 1622
Merged at revision: 1636
Proposed branch: lp:~unity-api-team/unity8/scopes-active-depends-on-screen
Merge into: lp:unity8
Diff against target: 20 lines (+2/-1)
1 file modified
qml/Dash/GenericScopeView.qml (+2/-1)
To merge this branch: bzr merge lp:~unity-api-team/unity8/scopes-active-depends-on-screen
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
Albert Astals Cid (community) code Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+250610@code.launchpad.net

Commit message

Only set scopes active when the screen is on

Description of the change

Only set scopes active when the screen is on

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

How does this work with

  https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1422309

The idea behind that bug is that the scope should refresh itself and tell the ui, but if the ui has set it to not active, why would it refresh itself?

review: Needs Information
Revision history for this message
Pete Woods (pete-woods) wrote :

This shouldn't affect the behaviour of anything related to that. Scopes shouldn't be being regularly refreshed while the phone is suspended. The solution to that bug would be to add the TTL property to the scope's results. This would cause the scope results to be invalidated after a certain period, and refreshed as soon as the scope becomes active again.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Not sure about that, as a user what i want is the scope being refreshed already when i power on the screen, not it having old data and then after a few seconds i am seeing wrong data (since it's not today anymore) it being refreshed with the good data.

Revision history for this message
Pete Woods (pete-woods) wrote :

Well the scope would start refreshing as soon as the screen comes on, by the time you've swiped the greeter out of the way, and possibly entered your password, it will have refreshed.

Revision history for this message
Albert Astals Cid (aacid) wrote :

This sets the isActive variable of scopes to false as intended, it doesn't fix the bug linked from the description because other pieces need to fall into place.

I'm not top-approving this since I don't want us to later realize this is not the fix we need when coding the lower parts of the fix and end up with a half-fix that does nothing.

review: Approve (code)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Works quite well when testing it, it starts gps again right after resuming the device.

review: Approve
Revision history for this message
Albert Astals Cid (aacid) wrote :

Ricardo, you tested it alone? Last time i tested on vivid-proposed + this branch it did not stop/start the gps, has anything landed that may fix that? Or you used any other branch in addition to this one?

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

I tested with RTM / krillin as the GPS service is working properly in there. We're about to land some additional location-service fixes for vivid only, which should make it to fully work again in there.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/GenericScopeView.qml'
2--- qml/Dash/GenericScopeView.qml 2015-02-11 17:10:44 +0000
3+++ qml/Dash/GenericScopeView.qml 2015-02-23 12:05:57 +0000
4@@ -19,6 +19,7 @@
5 import Utils 0.1
6 import Unity 0.2
7 import Dash 0.1
8+import Powerd 0.1
9 import "../Components"
10 import "../Components/ListItems" as ListItems
11
12@@ -104,7 +105,7 @@
13 Binding {
14 target: scope
15 property: "isActive"
16- value: isCurrent && !subPageLoader.open
17+ value: isCurrent && !subPageLoader.open && (Powerd.status === Powerd.On)
18 }
19
20 UnitySortFilterProxyModel {

Subscribers

People subscribed via source and target branches