aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/chat')
-rw-r--r--src/components/chat/chat.js10
-rw-r--r--src/components/chat/chat.scss6
2 files changed, 12 insertions, 4 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
index e57fcb91..b54f5fb2 100644
--- a/src/components/chat/chat.js
+++ b/src/components/chat/chat.js
@@ -73,7 +73,7 @@ const Chat = {
},
formPlaceholder () {
if (this.recipient) {
- return this.$t('chats.message_user', { nickname: this.recipient.screen_name })
+ return this.$t('chats.message_user', { nickname: this.recipient.screen_name_ui })
} else {
return ''
}
@@ -234,6 +234,13 @@ const Chat = {
const scrollable = this.$refs.scrollable
return scrollable && scrollable.scrollTop <= 0
},
+ cullOlderCheck () {
+ window.setTimeout(() => {
+ if (this.bottomedOut(JUMP_TO_BOTTOM_BUTTON_VISIBILITY_OFFSET)) {
+ this.$store.dispatch('cullOlderMessages', this.currentChatMessageService.chatId)
+ }
+ }, 5000)
+ },
handleScroll: _.throttle(function () {
if (!this.currentChat) { return }
@@ -241,6 +248,7 @@ const Chat = {
this.fetchChat({ maxId: this.currentChatMessageService.minId })
} else if (this.bottomedOut(JUMP_TO_BOTTOM_BUTTON_VISIBILITY_OFFSET)) {
this.jumpToBottomButtonVisible = false
+ this.cullOlderCheck()
if (this.newMessageCount > 0) {
// Use a delay before marking as read to prevent situation where new messages
// arrive just as you're leaving the view and messages that you didn't actually
diff --git a/src/components/chat/chat.scss b/src/components/chat/chat.scss
index aef58495..3a26686c 100644
--- a/src/components/chat/chat.scss
+++ b/src/components/chat/chat.scss
@@ -98,10 +98,10 @@
.unread-message-count {
font-size: 0.8em;
left: 50%;
- transform: translate(-50%, 0);
- border-radius: 100%;
margin-top: -1rem;
- padding: 0;
+ padding: 0.1em;
+ border-radius: 50px;
+ position: absolute;
}
.chat-loading-error {