Skip to content

Commit

Permalink
feat(ToggleButtonView): Add is_toggled
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Dec 30, 2024
1 parent 826a954 commit 88af6d8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/parser/classes/ToggleButtonView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ export default class ToggleButtonView extends YTNode {

default_button: ButtonView | null;
toggled_button: ButtonView | null;
identifier?: string;
is_toggling_disabled: boolean;
identifier?: string;
is_toggled?: boolean;

constructor(data: RawNode) {
super();
this.default_button = Parser.parseItem(data.defaultButtonViewModel, ButtonView);
this.toggled_button = Parser.parseItem(data.toggledButtonViewModel, ButtonView);
this.identifier = data.identifier;
this.is_toggling_disabled = data.isTogglingDisabled;
this.identifier = data.identifier;

if (Reflect.has(data, 'isToggled')) {
this.is_toggled = data.isToggled;
}
}
}

0 comments on commit 88af6d8

Please sign in to comment.