From 902d6c20aff2e4540428330078747a397acbfefd Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sat, 7 Aug 2021 04:47:20 +0300 Subject: [PATCH] [app] Mark more properties as readonly --- app/qml/BooksShelfView.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/qml/BooksShelfView.qml b/app/qml/BooksShelfView.qml index 16e4846..8aa8225 100644 --- a/app/qml/BooksShelfView.qml +++ b/app/qml/BooksShelfView.qml @@ -1,6 +1,6 @@ /* - Copyright (C) 2015-2020 Jolla Ltd. - Copyright (C) 2015-2020 Slava Monich + Copyright (C) 2015-2021 Jolla Ltd. + Copyright (C) 2015-2021 Slava Monich You may use this file under the terms of BSD license as follows: @@ -60,10 +60,10 @@ Item { signal scrollRight() signal scrollLeft() - property bool _haveBooks: shelfModel && shelfModel.count - property int _cellsPerRow: Math.floor(width/cellWidth) + readonly property bool _haveBooks: shelfModel.count > 0 + readonly property int _cellsPerRow: Math.floor(width/cellWidth) readonly property int _remorseTimeout: 5000 - property bool _loading: !shelfModel || shelfModel.loading || startAnimationTimer.running + readonly property bool _loading: shelfModel.loading || startAnimationTimer.running property var _remorse on_HaveBooksChanged: if (!_haveBooks) shelfView.stopEditing()