Skip to content

Commit

Permalink
TEMP commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekby committed Dec 4, 2023
1 parent 91b3a29 commit fd5447e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ import ChatEnabledState, {
} from "../../tabnineChatWidget/ChatEnabledState";
import EventEmitterBasedNonNullState from "../../state/EventEmitterBasedNonNullState";
import getUserInfo from "../requests/UserInfo";
import BINARY_STATE from "../../binary/binaryStateSingleton";

export default class SelfHostedChatEnabledState
extends EventEmitterBasedNonNullState<ChatEnabledStateData>
implements ChatEnabledState {
constructor(context: ExtensionContext) {
super(ChatStates.loading);

void this.updateState();
const stateListenDisposable = BINARY_STATE.onChange(() => {
void this.updateState();

if (stateListenDisposable) {
stateListenDisposable.dispose();
}
});

context.subscriptions.push(
authentication.onDidChangeSessions(() => {
Expand Down

0 comments on commit fd5447e

Please sign in to comment.