[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:
parent
7822f05631
commit
c8f643d8e3
1 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2015-2017 Jolla Ltd.
|
Copyright (C) 2015-2018 Jolla Ltd.
|
||||||
Copyright (C) 2015-2017 Slava Monich <slava.monich@jolla.com>
|
Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
|
||||||
|
|
||||||
You may use this file under the terms of BSD license as follows:
|
You may use this file under the terms of BSD license as follows:
|
||||||
|
|
||||||
|
@ -122,8 +122,12 @@ SilicaFlickable {
|
||||||
//: Pop-up notification
|
//: Pop-up notification
|
||||||
//% "Copied to clipboard"
|
//% "Copied to clipboard"
|
||||||
previewBody: qsTrId("harbour-books-book-view-copied_to_clipboard")
|
previewBody: qsTrId("harbour-books-book-view-copied_to_clipboard")
|
||||||
icon: "icon-s-clipboard"
|
|
||||||
expireTimeout: 2000
|
expireTimeout: 2000
|
||||||
|
Component.onCompleted: {
|
||||||
|
if ("icon" in notification) {
|
||||||
|
notification.icon = "icon-s-clipboard"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SilicaListView {
|
SilicaListView {
|
||||||
|
|
Loading…
Reference in a new issue