← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~mzanetti/reminders-app/workaround-oxide-race into lp:reminders-app

 

Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/workaround-oxide-race into lp:reminders-app.

Commit message:
workaround oxide race condition

Requested reviews:
  Ubuntu Notes app developers (notes-app-dev)
Related bugs:
  Bug #1471779 in Ubuntu Notes app: "WebView.loadHtml() doesn’t wait for context to be fully constructed, may result in user scripts not loaded"
  https://bugs.launchpad.net/reminders-app/+bug/1471779
  Bug #1487920 in Ubuntu Notes app: "Checkboxes don't stay checked"
  https://bugs.launchpad.net/reminders-app/+bug/1487920

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/workaround-oxide-race/+merge/270745
-- 
Your team Ubuntu Notes app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/workaround-oxide-race into lp:reminders-app.
=== modified file 'push-helper.apparmor'
--- push-helper.apparmor	2014-12-08 10:25:48 +0000
+++ push-helper.apparmor	2015-09-10 20:55:43 +0000
@@ -7,5 +7,5 @@
         "calendar",
         "webview"
     ],
-    "policy_version": 1.2
+    "policy_version": 1.3
 }

=== renamed file 'src/app/qml/components/Header.qml' => 'src/app/qml/components/NoteHeader.qml'
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml	2015-09-08 18:10:48 +0000
+++ src/app/qml/reminders.qml	2015-09-10 20:55:43 +0000
@@ -27,6 +27,7 @@
 import Ubuntu.OnlineAccounts.Client 0.1
 import Ubuntu.PushNotifications 0.1
 import Ubuntu.Content 1.0
+import com.canonical.Oxide 1.5
 import "components"
 import "ui"
 
@@ -491,6 +492,21 @@
         }
     }
 
+    // FIXME: This is currently located here so it is always ready
+    // when we're constructing a WebView. Due to bug
+    // https://bugs.launchpad.net/oxide/+bug/1471779
+    // there's a race condition when creating both at the same time
+    WebContext {
+        id: webContext
+
+        userScripts: [
+            UserScript {
+                context: 'reminders://interaction'
+                url: Qt.resolvedUrl("ui/reminders-scripts.js");
+            }
+        ]
+    }
+
     Column {
         id: statusBar
         anchors { left: parent.left; right: parent.right; top: parent.top; topMargin: units.gu(6)}

=== modified file 'src/app/qml/ui/EditNoteView.qml'
--- src/app/qml/ui/EditNoteView.qml	2015-07-25 01:52:22 +0000
+++ src/app/qml/ui/EditNoteView.qml	2015-09-10 20:55:43 +0000
@@ -131,7 +131,7 @@
                      width: parent.width
                      height: childrenRect.height
 
-                     Header {
+                     NoteHeader {
                         id: header
                         note: root.note
 

=== modified file 'src/app/qml/ui/NoteView.qml'
--- src/app/qml/ui/NoteView.qml	2015-09-08 18:10:48 +0000
+++ src/app/qml/ui/NoteView.qml	2015-09-10 20:55:43 +0000
@@ -39,6 +39,7 @@
         z: 10
     }
 
+<<<<<<< TREE
     Component.onDestruction: {
         if (priv.dirty) {
             NotesStore.saveNote(note.guid);
@@ -61,6 +62,8 @@
         ]
     }
 
+=======
+>>>>>>> MERGE-SOURCE
     Rectangle {
         id: locationBar
         y: noteTextArea.locationBarController.offset
@@ -70,7 +73,7 @@
         color: "white"
         z: 2
 
-        Header {
+        NoteHeader {
             id: headerContent
             note: root.note
             editingEnabled: false


Follow ups