Apparently Main.clean() can break things pretty hard.

But only if on the same board? Weird.
This commit is contained in:
Zixaphir 2014-01-07 21:12:17 -07:00
parent 497c231003
commit bb3d9c9d84
3 changed files with 14 additions and 9 deletions

View File

@ -12793,7 +12793,6 @@
} else { } else {
view = view || 'index'; view = view || 'index';
} }
Main.clean();
if (view === g.VIEW) { if (view === g.VIEW) {
if (view === 'index') { if (view === 'index') {
if (boardID === g.BOARD.ID) { if (boardID === g.BOARD.ID) {
@ -12803,7 +12802,11 @@
Main.updateBoard(boardID); Main.updateBoard(boardID);
return Index.update(); return Index.update();
} else { } else {
return Main.refresh(context); return Main.refresh({
boardID: boardID,
view: view,
threadID: threadID
});
} }
} else { } else {
return Main.disconnect(); return Main.disconnect();
@ -12852,7 +12855,7 @@
if (subtitle = $('.boardSubtitle')) { if (subtitle = $('.boardSubtitle')) {
$.rm(subtitle); $.rm(subtitle);
} }
return $('.boardTitle').innerHTML = "/" + board.board + "/ - " + board.title; return $('.boardTitle').innerHTML = d.title = "/" + board.board + "/ - " + board.title;
}, },
refresh: function(context) { refresh: function(context) {
var boardID, name, threadID, view, _results, _results1; var boardID, name, threadID, view, _results, _results1;

View File

@ -12767,7 +12767,6 @@
} else { } else {
view = view || 'index'; view = view || 'index';
} }
Main.clean();
if (view === g.VIEW) { if (view === g.VIEW) {
if (view === 'index') { if (view === 'index') {
if (boardID === g.BOARD.ID) { if (boardID === g.BOARD.ID) {
@ -12777,7 +12776,11 @@
Main.updateBoard(boardID); Main.updateBoard(boardID);
return Index.update(); return Index.update();
} else { } else {
return Main.refresh(context); return Main.refresh({
boardID: boardID,
view: view,
threadID: threadID
});
} }
} else { } else {
return Main.disconnect(); return Main.disconnect();
@ -12826,7 +12829,7 @@
if (subtitle = $('.boardSubtitle')) { if (subtitle = $('.boardSubtitle')) {
$.rm(subtitle); $.rm(subtitle);
} }
return $('.boardTitle').innerHTML = "/" + board.board + "/ - " + board.title; return $('.boardTitle').innerHTML = d.title = "/" + board.board + "/ - " + board.title;
}, },
refresh: function(context) { refresh: function(context) {
var boardID, name, threadID, view, _results, _results1; var boardID, name, threadID, view, _results, _results1;

View File

@ -345,7 +345,6 @@ Main =
view = 'thread' view = 'thread'
else else
view = view or 'index' view = view or 'index'
Main.clean()
# Moving from thread to thread or index to index. # Moving from thread to thread or index to index.
if view is g.VIEW if view is g.VIEW
@ -357,7 +356,7 @@ Main =
Index.update() Index.update()
else else
Main.refresh context Main.refresh {boardID, view, threadID}
else else
Main.disconnect() Main.disconnect()
@ -394,7 +393,7 @@ Main =
updateTitle: (board) -> updateTitle: (board) ->
$.rm subtitle if subtitle = $ '.boardSubtitle' $.rm subtitle if subtitle = $ '.boardSubtitle'
$('.boardTitle').innerHTML = "/#{board.board}/ - #{board.title}" $('.boardTitle').innerHTML = d.title = "/#{board.board}/ - #{board.title}"
refresh: (context) -> refresh: (context) ->
{boardID, view, threadID} = context {boardID, view, threadID} = context