minimizing the composer should unregister it

This commit is contained in:
Julian Lam
2014-03-01 17:49:39 -05:00
parent 68fb6ec09a
commit a9b78d2600
2 changed files with 5 additions and 3 deletions

View File

@@ -390,9 +390,8 @@ define(['taskbar'], function(taskbar) {
composer.createNewComposer(post_uuid);
}
var tid = templates.get('topic_id'),
postData = composer.posts[post_uuid];
if (tid) {
var postData = composer.posts[post_uuid];
if (postData.tid) {
// Replying to a topic
socket.emit('modules.composer.register', {
uuid: post_uuid,
@@ -843,6 +842,8 @@ define(['taskbar'], function(taskbar) {
postContainer.css('visibility', 'hidden');
composer.active = undefined;
taskbar.minimize('composer', post_uuid);
socket.emit('modules.composer.unregister', post_uuid);
};
return {

View File

@@ -78,6 +78,7 @@ SocketModules.composer.renderHelp = function(socket, data, callback) {
SocketModules.composer.register = function(socket, data) {
var now = Date.now();
server.in('topic_' + data.tid).emit('event:topic.replyStart', data.uid);
data.socket = socket;