[app] Fixed compatibility with Sailfish OS < 2.1.0

Notification object didn't have the "icon" property until Sailfish OS 2.1.0.
Its presense needs to be checked at run time.
This commit is contained in:
Slava Monich 2018-02-26 17:39:30 +02:00
parent 7822f05631
commit c8f643d8e3

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2015-2017 Jolla Ltd.
Copyright (C) 2015-2017 Slava Monich <slava.monich@jolla.com>
Copyright (C) 2015-2018 Jolla Ltd.
Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
You may use this file under the terms of BSD license as follows:
@ -122,8 +122,12 @@ SilicaFlickable {
//: Pop-up notification
//% "Copied to clipboard"
previewBody: qsTrId("harbour-books-book-view-copied_to_clipboard")
icon: "icon-s-clipboard"
expireTimeout: 2000
Component.onCompleted: {
if ("icon" in notification) {
notification.icon = "icon-s-clipboard"
}
}
}
SilicaListView {