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:
parent
76e2893be6
commit
8e0a07ab30
@ -42,6 +42,7 @@ exposed by a function if necessary.
|
|||||||
active: {}
|
active: {}
|
||||||
available: {}
|
available: {}
|
||||||
|
|
||||||
|
hiddenTopics = {}
|
||||||
fileUploaded = no
|
fileUploaded = no
|
||||||
errorVisible = false
|
errorVisible = false
|
||||||
inputErrorHidingTimer = null
|
inputErrorHidingTimer = null
|
||||||
@ -347,6 +348,9 @@ Toggle checkboxes.
|
|||||||
Hide topic container.
|
Hide topic container.
|
||||||
|
|
||||||
$('#timsChatTopicCloser').on 'click', ->
|
$('#timsChatTopicCloser').on 'click', ->
|
||||||
|
unless hiddenTopics[roomList.active.roomID]?
|
||||||
|
hiddenTopics[roomList.active.roomID] = true
|
||||||
|
|
||||||
$('#timsChatTopic').addClass 'invisible'
|
$('#timsChatTopic').addClass 'invisible'
|
||||||
do $(window).resize
|
do $(window).resize
|
||||||
|
|
||||||
@ -885,13 +889,10 @@ Joins a room.
|
|||||||
roomID: roomID
|
roomID: roomID
|
||||||
success: (data) ->
|
success: (data) ->
|
||||||
loading = false
|
loading = false
|
||||||
|
|
||||||
roomList.active = data.returnValues
|
roomList.active = data.returnValues
|
||||||
|
|
||||||
$('#timsChatTopic').removeClass 'invisible'
|
|
||||||
|
|
||||||
$('#timsChatTopic > .topic').text roomList.active.topic
|
$('#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'
|
$('#timsChatTopic').addClass 'invisible'
|
||||||
else
|
else
|
||||||
$('#timsChatTopic').removeClass 'invisible'
|
$('#timsChatTopic').removeClass 'invisible'
|
||||||
|
Loading…
Reference in New Issue
Block a user