moving threads will refresh view for all connected clients as well

v1.18.x
Julian Lam 12 years ago
parent a0fa95b9f0
commit 2ca1986b40

@ -179,7 +179,6 @@
commitEl.innerHTML = 'Moving <i class="icon-spin icon-refresh"></i>';
socket.once('api:topic.move', function(data) {
console.log(data);
moveThreadModal.modal('hide');
if (data.status === 'ok') {
app.alert({
@ -286,6 +285,10 @@
}
});
socket.on('event:topic_moved', function(data) {
if (data && data.tid > 0) ajaxify.go('topic/' + data.tid);
});
function adjust_rep(value, pid, uid) {
var post_rep = jQuery('.post_rep_' + pid),
user_rep = jQuery('.user_rep_' + uid);

@ -293,6 +293,7 @@ var RDB = require('./redis.js'),
RDB.set('tid:' + tid + ':category_slug', data.categories[0].slug);
});
socket.emit('api:topic.move', { status: 'ok' });
io.sockets.in('topic_' + tid).emit('event:topic_moved', { tid: tid });
} else {
socket.emit('api:topic.move', { status: 'error' });
}

Loading…
Cancel
Save