mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-13 15:27:16 +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.
|
||||
* The callback is a function that takes subject (generic type) and detail (specific type or data).
|
||||
* 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).
|
||||
*/
|
||||
CLS.prototype.onStateChanged = function(callback, trigger){
|
||||
CLS.prototype.onStateChanged = function(callback){
|
||||
stateChangedEvents.push(callback);
|
||||
trigger && callback();
|
||||
};
|
||||
|
||||
return new CLS();
|
||||
|
Loading…
x
Reference in New Issue
Block a user