Optimize game.showExtensionChangeLog.
(cherry picked from commit c5eeb67e390a232b1a577d2c04a72f4119592754)
This commit is contained in:
parent
4043bf1271
commit
3d4f04860b
16
game/game.js
16
game/game.js
|
@ -38376,16 +38376,14 @@
|
|||
lib.init.onfree();
|
||||
}
|
||||
},
|
||||
showExtensionChangeLog:function(str,extname){
|
||||
showExtensionChangeLog:(str,extname)=>{
|
||||
extname=extname||_status.extension;
|
||||
var cfg='extension_'+extname+'_changelog';
|
||||
if(lib.extensionPack[extname]&&lib.extensionPack[extname].version!=lib.config[cfg]){
|
||||
game.saveConfig(cfg,lib.extensionPack[extname].version);
|
||||
if(!_status.extensionChangeLog){
|
||||
_status.extensionChangeLog={};
|
||||
_status.extensionChangeLog[extname]=str;
|
||||
}
|
||||
}
|
||||
const cfg=`extension_${extname}_changelog`;
|
||||
if(!lib.extensionPack[extname]||lib.extensionPack[extname].version==lib.config[cfg]) return;
|
||||
game.saveConfig(cfg,lib.extensionPack[extname].version);
|
||||
if(_status.extensionChangeLog) return;
|
||||
_status.extensionChangeLog={};
|
||||
_status.extensionChangeLog[extname]=str;
|
||||
},
|
||||
saveConfig:(key,value,local,callback)=>{
|
||||
if(_status.reloading) return;
|
||||
|
|
Loading…
Reference in New Issue