Skip to content

Commit

Permalink
fix(chat): char counter update on emoji - [AP-169] (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
KemoPaw committed Dec 16, 2021
1 parent d5fde04 commit c615dad
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions components/views/chat/chatbar/footer/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<template>
<div id="bottom-bar-container">
<UiChatTypingIndicator v-if="typing" :users="usersTyping" />
<span :class="`charlimit ${charlimit ? 'is-error' : 'is-normal'}`">{{
`${text.length}/${maxChars}`
}}</span>
<span :class="['charlimit', charlimit ? 'is-error' : 'is-normal']">
{{ lengthCount }}
</span>
</div>
</template>

<script lang="ts">
import Vue, { PropType } from 'vue'
import Vue from 'vue'
import { mapState } from 'vuex'
import { Friend } from '~/types/ui/friends'
import { toArray } from 'lodash'
export default Vue.extend({
props: {
text: {
type: String,
default: '',
},
charlimit: {
type: Boolean,
},
Expand All @@ -37,6 +33,9 @@ export default Vue.extend({
},
computed: {
...mapState(['ui']),
lengthCount() {
return `${toArray(this.ui.chatbarContent).length}/${this.maxChars}`
},
},
})
</script>
Expand Down Expand Up @@ -69,4 +68,4 @@ export default Vue.extend({
}
}
}
</style>
</style>

0 comments on commit c615dad

Please sign in to comment.