samples/video_conferencing/js/messages.js
function showUserIsTypingView(isTyping, userId, dialogId) {
    if (isMessageForCurrentDialog(userId, dialogId)) {

        if (!isTyping) {
            $('#' + userId + '_typing').remove();
        } else if (userId != currentUser.id) {
            var userLogin = getUserLoginById(userId);
            var typingUserHtml = buildTypingUserHtml(userId, userLogin);
            $('#messages-list').append(typingUserHtml);
        }

        // scroll to bottom
        var mydiv = $('#messages-list');
        mydiv.scrollTop(mydiv.prop('scrollHeight'));
    }
}
function showUserIsTypingView(isTyping, userId, dialogId) {
    if (isMessageForCurrentDialog(userId, dialogId)) {

        if (!isTyping) {
            $('#' + userId + '_typing').remove();
        } else if (userId != currentUser.id) {
            var userLogin = getUserLoginById(userId);
            var typingUserHtml = buildTypingUserHtml(userId, userLogin);
            $('#messages-list').append(typingUserHtml);
        }

        // scroll to bottom
        var mydiv = $('#messages-list');
        mydiv.scrollTop(mydiv.prop('scrollHeight'));
    }
}
function showUserIsTypingView ( isTyping , userId , dialogId ) { if ( isMessageForCurrentDialog ( userId , dialogId ) ) { if ( ! isTyping ) { $ ( '#' + userId + '_typing' ) . remove ( ) ; } else if ( userId != currentUser . id ) { var userLogin = getUserLoginById ( userId ) ; var typingUserHtml = buildTypingUserHtml ( userId , userLogin ) ; $ ( '#messages-list' ) . append ( typingUserHtml ) ; } // scroll to bottom var mydiv = $ ( '#messages-list' ) ; mydiv . scrollTop ( mydiv . prop ( 'scrollHeight' ) ) ; } }
show or hide typing status to other users
show or hide typing status to other users