applets/batterymonitor: Don't check for context property being null

It's not needed anymore, as we use the attached property now.
wilder-5.26
ivan tkachenko 4 years ago
parent 39989a5720
commit 66a70e0e86
No known key found for this signature in database
GPG Key ID: AF72731B7C654CB3
  1. 4
      applets/batterymonitor/package/contents/ui/main.qml

@ -2,6 +2,7 @@
SPDX-FileCopyrightText: 2011 Sebastian Kügler <sebas@kde.org>
SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com>
SPDX-FileCopyrightText: 2013-2015 Kai Uwe Broulik <kde@privat.broulik.de>
SPDX-FileCopyrightText: 2021-2022 ivan tkachenko <me@ratijas.tk>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
@ -340,8 +341,7 @@ Item {
}
Plasmoid.setAction("showPercentage", i18n("Show Battery Percentage on Icon"), "format-number-percent");
Plasmoid.action("showPercentage").checkable = true;
Plasmoid.action("showPercentage").checked = Qt.binding(() =>
plasmoid !== null && Plasmoid.configuration.showPercentage);
Plasmoid.action("showPercentage").checked = Qt.binding(() => Plasmoid.configuration.showPercentage);
if (batterymonitor.kcmAuthorized) {
Plasmoid.removeAction("configure");

Loading…
Cancel
Save