mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-13 07:17:12 +03:00
Add a return value to addDiscordMessages in state.js
This commit is contained in:
parent
810ef6d343
commit
4087684913
@ -24,6 +24,8 @@ var STATE = (function(){
|
||||
*/
|
||||
var SETTINGS = function(){
|
||||
defineTriggeringProperty(this, "setting", "autoscroll");
|
||||
defineTriggeringProperty(this, "setting", "afterFirstMsg");
|
||||
defineTriggeringProperty(this, "setting", "afterSavedMsg");
|
||||
};
|
||||
|
||||
/*
|
||||
@ -31,6 +33,8 @@ var STATE = (function(){
|
||||
*/
|
||||
SETTINGS.prototype._reset = function(){
|
||||
this._autoscroll = true;
|
||||
this._afterFirstMsg = "optPause";
|
||||
this._afterSavedMsg = "optPause";
|
||||
};
|
||||
|
||||
/*
|
||||
@ -113,11 +117,15 @@ var STATE = (function(){
|
||||
};
|
||||
|
||||
/*
|
||||
* Adds all messages from the array to the specified channel.
|
||||
* Adds all messages from the array to the specified channel. Returns true if the savefile was updated.
|
||||
*/
|
||||
CLS.prototype.addDiscordMessages = function(channelId, discordMessageArray){
|
||||
if (this.getSavefile().addMessagesFromDiscord(channelId, discordMessageArray)){
|
||||
triggerStateChanged("data", "messages");
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user