mime-chat/src/profile.ts
Andrew Gundersen 531a32a5a5 updated protocols
2021-07-11 11:54:39 -05:00

22 lines
No EOL
382 B
TypeScript

import { ipcEmit } from "@/composables/useEmitter";
export default class ProfileHandler {
profile: Profile;
constructor(profile: Profile) {
this.profile = profile;
this.emit();
}
emit() {
ipcEmit("set-profile", this.profile);
}
update(update: Update) {
this.profile = update.data as Profile;
this.emit()
}
}