1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

4.0.0-rc19.2

* Fixed: Logic error when tracking new settings.
This commit is contained in:
SirStendec 2019-05-03 22:52:26 -04:00
parent 3e9e1b2ede
commit 8ea4e09bfd
3 changed files with 23 additions and 17 deletions

View file

@ -149,7 +149,7 @@ ${typeof x[1] === 'string' ? x[1] : JSON.stringify(x[1], null, 4)}`
FrankerFaceZ.Logger = Logger;
const VER = FrankerFaceZ.version_info = {
major: 4, minor: 0, revision: 0, extra: '-rc19.1',
major: 4, minor: 0, revision: 0, extra: '-rc19.2',
commit: __git_commit__,
build: __webpack_hash__,
toString: () =>

View file

@ -36,6 +36,8 @@ export default class MainMenu extends Module {
//this.should_enable = true;
this.new_seen = false;
this._settings_tree = null;
this._settings_count = 0;
@ -299,7 +301,9 @@ export default class MainMenu extends Module {
this.rebuildSettingsTree();
const tree = this._settings_tree,
settings_seen = this.settings.provider.get('cfg-seen', []),
settings_seen = this.new_seen ? null : this.settings.provider.get('cfg-seen'),
new_seen = settings_seen ? null : [],
collapsed = this.settings.provider.get('cfg-collapsed'),
root = {},
@ -310,6 +314,8 @@ export default class MainMenu extends Module {
have_locale = this.i18n.locale !== 'en';
if ( new_seen )
this.new_seen = true;
for(const key in tree) {
if ( ! has(tree, key) )
@ -373,17 +379,16 @@ export default class MainMenu extends Module {
tok.search_terms = terms.map(format_term).join('\n');
if ( ! settings_seen.includes(setting_key)) {
// Mark existing settings as unseen for now.
// Let users run this for a while to build up their cache.
settings_seen.push(setting_key);
/*let i = tok;
if ( settings_seen ) {
if ( ! settings_seen.includes(setting_key) ) {
let i = tok;
while(i) {
i.unseen = (i.unseen||0) + 1;
i.unseen = (i.unseen || 0) + 1;
i = i.parent;
}*/
}
}
} else if ( new_seen )
new_seen.push(setting_key);
list.push(tok);
}
@ -453,7 +458,8 @@ export default class MainMenu extends Module {
items.keys = copies;
// Save for now, since we just want to mark everything as seen.
this.settings.provider.set('cfg-seen', settings_seen);
if ( new_seen )
this.settings.provider.set('cfg-seen', new_seen);
if ( ! collapsed ) {
const new_collapsed = [];

View file

@ -255,7 +255,7 @@ export default class Player extends Module {
default: false,
ui: {
path: 'Player > General >> General',
title: 'Hide Event Bar',
title: 'Hide the Event Bar',
description: 'Hide the Event Bar which appears above the player when there is an ongoing event for the current channel.',
component: 'setting-check-box'
},
@ -269,7 +269,7 @@ export default class Player extends Module {
default: false,
ui: {
path: 'Player > General >> General',
title: 'Hide Rerun Bar',
title: 'Hide the Rerun Bar',
description: 'Hide the Rerun Bar which appears above the player when the current channel is playing a video rather than live content.',
component: 'setting-check-box'
},
@ -283,7 +283,7 @@ export default class Player extends Module {
default: false,
ui: {
path: 'Player > General >> General',
title: 'Hide Squad Streaming Bar',
title: 'Hide the Squad Streaming Bar',
component: 'setting-check-box'
},
changed: () => this.SquadStreamBar.forceUpdate()