mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-16 12:32:50 +01:00
moving threads will refresh view for all connected clients as well
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user