1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Don't show topic of a room again if it has been hidden during the current session

This commit is contained in:
Maximilian Mader 2014-03-13 20:56:46 +01:00
parent 76e2893be6
commit 8e0a07ab30

View File

@ -42,6 +42,7 @@ exposed by a function if necessary.
active: {}
available: {}
hiddenTopics = {}
fileUploaded = no
errorVisible = false
inputErrorHidingTimer = null
@ -347,9 +348,12 @@ Toggle checkboxes.
Hide topic container.
$('#timsChatTopicCloser').on 'click', ->
$('#timsChatTopic').addClass 'invisible'
do $(window).resize
unless hiddenTopics[roomList.active.roomID]?
hiddenTopics[roomList.active.roomID] = true
$('#timsChatTopic').addClass 'invisible'
do $(window).resize
Close private channels
$('#timsChatMessageTabMenu').on 'click', '.jsChannelCloser', -> closePrivateChannel $(@).parent().data 'userID'
@ -885,13 +889,10 @@ Joins a room.
roomID: roomID
success: (data) ->
loading = false
roomList.active = data.returnValues
$('#timsChatTopic').removeClass 'invisible'
$('#timsChatTopic > .topic').text roomList.active.topic
if roomList.active.topic.trim() is ''
if roomList.active.topic.trim() is '' or hiddenTopics[roomList.active.roomID]?
$('#timsChatTopic').addClass 'invisible'
else
$('#timsChatTopic').removeClass 'invisible'