1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

Fix a race condition with the chat column

Summary:
Ref T7062. When we load a thread, we always show the column, even if it has been closed between the time we sent the request and when we're processing the response.

Normally this isn't a big deal, but it can specifically show up on mobile.

(This load also shouldn't be happening at all, but I'll fix that separately.)

Test Plan: Mobile no longer shows the column after it loads.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7062

Differential Revision: https://secure.phabricator.com/D12195
This commit is contained in:
epriestley 2015-03-28 15:46:13 -07:00
parent 29beb174d3
commit a48b486344
2 changed files with 17 additions and 13 deletions

View file

@ -354,7 +354,7 @@ return array(
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'bb928342',
'rsrc/js/application/conpherence/behavior-durable-column.js' => '89fc9db0',
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'cccebf26',
'rsrc/js/application/conpherence/behavior-menu.js' => 'de5579b4',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
@ -584,7 +584,7 @@ return array(
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
'javelin-behavior-durable-column' => '89fc9db0',
'javelin-behavior-durable-column' => 'cccebf26',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => 'bbdf75ca',
@ -1494,16 +1494,6 @@ return array(
'javelin-dom',
'javelin-vector',
),
'89fc9db0' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-behavior-device',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'8a41885b' => array(
'javelin-install',
'javelin-dom',
@ -1760,6 +1750,16 @@ return array(
'javelin-stratcom',
'phabricator-phtize',
),
'cccebf26' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-behavior-device',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'd19198c8' => array(
'javelin-install',
'javelin-dom',

View file

@ -119,7 +119,11 @@ JX.behavior('durable-column', function(config, statics) {
var column = _getColumnNode();
var new_column = JX.$H(r.content);
JX.DOM.replace(column, new_column);
if (show) {
JX.DOM.show(_getColumnNode());
} else {
JX.DOM.hide(_getColumnNode());
}
var messages = _getColumnMessagesNode();
scrollbar = new JX.Scrollbar(_getColumnScrollNode());
scrollbar.scrollTo(messages.scrollHeight);