broulik added a comment.
This is both genius and evil. I like that you kept it all in the theme. INLINE COMMENTS > timer.js:25 > > -import "../components" > +var callbacks = new Array(); > `var callbacks = [];` > timer.js:27 > > -ActionButton { > - property var action > - onClicked: action() > - Layout.alignment: Qt.AlignTop > - iconSize: units.iconSizes.huge > - opacity: activeFocus || containsMouse ? 1 : 0.5 > - font.underline: false > - Behavior on opacity { > - OpacityAnimator { > - duration: units.longDuration > - easing.type: Easing.InOutQuad > +function setCancelAutoTriggerCallback(callback) { > + callbacks.push(callback); Name it `add` as first reading the QML file I thought you were overwriting the callback every time > timer.js:32 > +function cancelAutoTrigger() { > + for (var i in callbacks) { > + var c = callbacks[i](); I recall `for .. in` with JS Arrays being bad. I don't remember why, though. Perhaps do callbacks.forEach(function(c) { ... }) REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D12893 To: davidedmundson, #plasma Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart