mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-06-02 00:21:18 +03:00
Remove trigger parameter from onStateChanged in state.js
This commit is contained in:
parent
1eaea33919
commit
fdd796b907
@ -121,12 +121,10 @@ var STATE = (function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adds a listener that is called whenever the state changes. If trigger is true, the callback is ran after adding it to the listener list.
|
* Adds a listener that is called whenever the state changes. The callback is a function that takes subject (generic type) and detail (specific type or data).
|
||||||
* The callback is a function that takes subject (generic type) and detail (specific type or data).
|
|
||||||
*/
|
*/
|
||||||
CLS.prototype.onStateChanged = function(callback, trigger){
|
CLS.prototype.onStateChanged = function(callback){
|
||||||
stateChangedEvents.push(callback);
|
stateChangedEvents.push(callback);
|
||||||
trigger && callback();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return new CLS();
|
return new CLS();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user