MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / initializeState

Method initializeState

chat/components/RightPanel.js:165–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163 if (key === PREF_KEYS.rightPanelVisible && typeof value === 'boolean') {
164 this.isVisible = value;
165 this.updatePanelVisibility();
166 }
167 if (key === PREF_KEYS.ticketInfoVisible && typeof value === 'boolean') {
168 this.showTicketInfo = value;
169 this.updateTicketInfoVisibility();
170 this.updateTicketInfoToggleButton();
171 }
172 if (key === PREF_KEYS.invitationFormVisible && typeof value === 'boolean') {
173 this.showInvitationForm = value;
174 this.invitationFormPreference = value;
175 this.renderTopSectionOnly();
176 }
177 });
178 }
179
180 initializeState() {
181 // Load initial ticket count
182 this.ticketCount = this.app.services.tickets.getTicketCount();
183 // Only auto-show form when no tickets if user hasn't explicitly set a preference
184 if (this.ticketCount === 0 && this.invitationFormPreference === null) {

Callers 1

constructorMethod · 0.95

Calls 4

loadNextTicketMethod · 0.95
loadSessionDataMethod · 0.95
getTicketCountMethod · 0.80
getCurrentSessionMethod · 0.80

Tested by

no test coverage detected