From 78d1697cd63033244304f7794cf9157029e4fdb5 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Wed, 8 Apr 2015 11:52:14 +0200 Subject: Implemented firmwareUpgrade in daemon --- app/qml/pages/WatchPage.qml | 11 +---------- app/qml/pebble.qml | 4 ++-- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'app/qml') diff --git a/app/qml/pages/WatchPage.qml b/app/qml/pages/WatchPage.qml index 6c24ef0..55f4db0 100644 --- a/app/qml/pages/WatchPage.qml +++ b/app/qml/pages/WatchPage.qml @@ -5,15 +5,7 @@ import Sailfish.Silica 1.0 Page { id: watchPage - property bool firmwareVersionOK: false - - Component.onCompleted: { - pebbled.info.firmware.forEach(function(firmware){ - if (!firmware.recovery) { - firmwareVersionOK = (firmware.version.indexOf("v1.") !== 0) - } - }) - } + property bool firmwareVersionOK: app.firmwareVersion && app.firmwareVersion.indexOf("v1.") !== 0 SilicaFlickable { id: flickable @@ -78,7 +70,6 @@ Page { from: Theme.primaryColor; to: Theme.highlightColor duration: 2500 loops: Animation.Infinite - easing: { type: Easing.InOutQuint } } } diff --git a/app/qml/pebble.qml b/app/qml/pebble.qml index a4b8b1f..380ff7e 100644 --- a/app/qml/pebble.qml +++ b/app/qml/pebble.qml @@ -32,8 +32,8 @@ ApplicationWindow function notifyNewFirmware() { firmwareLatest = pebbleFirmware.latest.friendlyVersion || "" - if (firmwareLatest && firmwareVersion && firmwareVersion !== firmwareLatest) { - pebbled.notifyFirmware(firmwareLatest); + if (firmwareLatest && firmwareVersion) { + pebbled.notifyFirmware(firmwareVersion === firmwareLatest); } } -- cgit v1.2.3