Merge lp:~kissiel/checkbox/fix-1493467-uncategorized-skipped into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4059
Merged at revision: 4062
Proposed branch: lp:~kissiel/checkbox/fix-1493467-uncategorized-skipped
Merge into: lp:checkbox
Diff against target: 31 lines (+13/-7)
1 file modified
checkbox-touch/checkbox-touch.qml (+13/-7)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1493467-uncategorized-skipped
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+275245@code.launchpad.net

Description of the change

This MR makes the categorySelectionScreen detect having only one item listed
and that being id: "2013.com.canonical.plainbox::uncategorised". As a result it
will call trigger selectionDone signal, as would normal (manual) selection.

8b76c60 checkbox-touch: skip category selection if only uncategorized tests present

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox-touch/checkbox-touch.qml'
--- checkbox-touch/checkbox-touch.qml 2015-10-14 21:48:15 +0000
+++ checkbox-touch/checkbox-touch.qml 2015-10-21 21:24:37 +0000
@@ -318,14 +318,20 @@
318318
319 function setup(continuation) {319 function setup(continuation) {
320 app.getCategories(function(response) {320 app.getCategories(function(response) {
321 var category_info_list = response.category_info_list;321 var uncategorised_id = "2013.com.canonical.plainbox::uncategorised"
322 model.clear();322 if (response.category_info_list.length === 1 &&
323 for (var i=0; i<category_info_list.length; i++) {323 response.category_info_list[0].mod_id == uncategorised_id) {
324 var category_info = category_info_list[i]; 324 selectionDone(uncategorised_id);
325 model.append(category_info);325 } else {
326 var category_info_list = response.category_info_list;
327 model.clear();
328 for (var i=0; i<category_info_list.length; i++) {
329 var category_info = category_info_list[i];
330 model.append(category_info);
331 }
332 modelUpdated();
333 pageStack.push(categorySelectionPage);
326 }334 }
327 modelUpdated();
328 pageStack.push(categorySelectionPage);
329 // if called from welcome page, no continuation is given335 // if called from welcome page, no continuation is given
330 if (continuation) continuation();336 if (continuation) continuation();
331 });337 });

Subscribers

People subscribed via source and target branches