Refactor: Minor code refactoring in accordance with Vue.js best practices (#368)

This commit is contained in:
James George
2019-12-16 18:23:14 +05:30
committed by Pranav Raj S
parent 17587d8a0c
commit 87fb1adab1
14 changed files with 23 additions and 27 deletions

View File

@@ -27,7 +27,7 @@
class="icon ion-happy-outline"
:class="{ active: showEmojiPicker }"
@click="toggleEmojiPicker()"
></i>
/>
</div>
<div class="reply-box__bottom">
@@ -65,7 +65,7 @@
'ion-android-send': !isPrivate,
'ion-android-lock': isPrivate,
}"
></i>
/>
</button>
</div>
</div>
@@ -114,7 +114,7 @@ export default {
return;
}
const isSlashCommand = val[0] === '/';
const hasNextWord = val.indexOf(' ') > -1;
const hasNextWord = val.includes(' ');
const isShortCodeActive = isSlashCommand && !hasNextWord;
if (isShortCodeActive) {
this.showCannedResponsesList = true;