fix: hide widget not working

This commit is contained in:
Ejaaz Khan 2026-04-07 15:56:43 +05:30 committed by iamejaaz
parent 2748bb78bf
commit d6d732cf91

View file

@ -4,6 +4,7 @@ export default class Widget {
constructor(opts) {
Object.assign(this, opts);
this.make();
this.apply_hidden_state();
}
refresh() {
@ -197,4 +198,10 @@ export default class Widget {
set_footer() {
//
}
apply_hidden_state() {
const is_hidden = Boolean(this.hidden);
const show_for_customize = is_hidden && this.in_customize_mode;
this.widget.toggleClass("hidden", is_hidden && !show_for_customize);
}
}