mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Tweak some single line elseifs
This commit is contained in:
@@ -98,15 +98,18 @@ export class ChatBox implements AfterViewInit, OnDestroy {
|
||||
}
|
||||
addEmoji(emoji: string) {
|
||||
this.toggleEmojiBox();
|
||||
if (!this.message) this.message = emoji;
|
||||
else if (this.input.maxLength > this.message.length) {
|
||||
if (!this.message) {
|
||||
this.message = emoji;
|
||||
} else if (this.input.maxLength > this.message.length) {
|
||||
this.message += emoji;
|
||||
}
|
||||
}
|
||||
toggleEmojiBox() {
|
||||
if (this.emojiBoxState === 'none')
|
||||
if (this.emojiBoxState === 'none') {
|
||||
this.emojiBoxState = 'inline-block';
|
||||
else this.emojiBoxState = 'none';
|
||||
} else {
|
||||
this.emojiBoxState = 'none';
|
||||
}
|
||||
}
|
||||
send(_event: Event | undefined) {
|
||||
let chatType = this.chatType;
|
||||
|
||||
Reference in New Issue
Block a user