Skip to content

Commit 13c10af

Browse files
committed
gwl: Adjust state connection id handling
1 parent 9990948 commit 13c10af

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

files/usr/share/cinnamon/applets/[email protected]/appGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ var AppGroup = class AppGroup {
12081208
}
12091209

12101210
destroy(skipRefCleanup) {
1211-
if (this.groupStateConnectionId) {
1211+
if (this.groupStateConnectionId > 0) {
12121212
this.groupState.disconnect(this.groupStateConnectionId);
12131213
}
12141214
this.signals.disconnectAllSignals();

files/usr/share/cinnamon/applets/[email protected]/state.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,14 @@ var createStore = function(state = {}, listeners = [], connections = 0) {
252252
}
253253
if (listener) {
254254
let newKeys = intersect(keys, listener.keys, true);
255-
listener.keys.concat(newKeys);
255+
listener.keys = listener.keys.concat(newKeys);
256256
} else {
257257
listeners.push({keys, callback, id});
258258
}
259259
}
260260

261261
function connect(actions, callback) {
262-
const id = connections++;
262+
const id = ++connections;
263263
if (Array.isArray(actions)) {
264264
_connect(actions, callback, id);
265265
} else if (typeof actions === 'string') {

0 commit comments

Comments
 (0)