mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
Changed behaviour of the Chat Typing Notification
Instead of being placed at the bottom of the modal/list, it will now be displayed at the top of the modal, and not shown in the chats page at all (as it is already present in the contact list)
This commit is contained in:
@@ -148,22 +148,10 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
|
||||
});
|
||||
|
||||
socket.on('event:chats.userStartTyping', function(withUid) {
|
||||
var typingNotifEl = $('.user-typing');
|
||||
|
||||
if (Chats.isCurrentChat(withUid)) {
|
||||
typingNotifEl.removeClass('hide');
|
||||
}
|
||||
|
||||
$('.chats-list li[data-uid="' + withUid + '"]').addClass('typing');
|
||||
});
|
||||
|
||||
socket.on('event:chats.userStopTyping', function(withUid) {
|
||||
var typingNotifEl = $('.user-typing');
|
||||
|
||||
if (Chats.isCurrentChat(withUid)) {
|
||||
typingNotifEl.addClass('hide');
|
||||
}
|
||||
|
||||
$('.chats-list li[data-uid="' + withUid + '"]').removeClass('typing');
|
||||
});
|
||||
|
||||
|
||||
@@ -312,8 +312,6 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
||||
}
|
||||
});
|
||||
|
||||
chatModal.find('.user-typing .text').translateText('[[modules:chat.user_typing, ' + data.username + ']]');
|
||||
|
||||
taskbar.push('chat', chatModal.attr('UUID'), {
|
||||
title: data.username,
|
||||
touid: data.touid,
|
||||
@@ -459,14 +457,13 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
|
||||
}
|
||||
|
||||
module.appendChatMessage = function(chatModal, data, done) {
|
||||
var chatContent = chatModal.find('#chat-content'),
|
||||
typingNotif = chatModal.find('.user-typing');
|
||||
var chatContent = chatModal.find('#chat-content');
|
||||
|
||||
Chats.parseMessage(data, function(html) {
|
||||
var message = $(html);
|
||||
message.find('img:not(".chat-user-image")').addClass('img-responsive');
|
||||
message.find('.timeago').timeago();
|
||||
message.insertBefore(typingNotif);
|
||||
message.appendTo(chatContent);
|
||||
Chats.scrollToBottom(chatContent);
|
||||
|
||||
if (typeof done === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user