зеркало из https://github.com/mozilla/pjs.git
fix for #77506. r=varada, sr=bienvenu
prevent the bad state where we are supressing message display, but the message pane is not hidden.
This commit is contained in:
Родитель
0029232235
Коммит
ac40b90f6b
|
@ -583,11 +583,7 @@ function CreateDBView(msgFolder, viewType, viewFlags, sortType, sortOrder)
|
|||
|
||||
// based on the collapsed state of the thread pane/message pane splitter,
|
||||
// supress message display if appropriate.
|
||||
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
|
||||
if (collapsed)
|
||||
gDBView.supressMsgDisplay = true;
|
||||
else
|
||||
gDBView.supressMsgDisplay = false;
|
||||
gDBView.supressMsgDisplay = IsThreadAndMessagePaneSplitterCollapsed();
|
||||
|
||||
UpdateSortIndicators(gCurSortType, sortOrder);
|
||||
PersistViewAttributesOnFolder();
|
||||
|
@ -680,30 +676,22 @@ function GetSelectedFolderResource()
|
|||
return folderResource;
|
||||
}
|
||||
|
||||
//Called when the splitter in between the thread and message panes is clicked.
|
||||
function OnClickThreadAndMessagePaneSplitter()
|
||||
{
|
||||
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
|
||||
// collapsed is the previous state, so we must be expanding
|
||||
// the splitter if collapsed is true
|
||||
if (gDBView)
|
||||
function OnMouseUpThreadAndMessagePaneSplitter()
|
||||
{
|
||||
if (!collapsed)
|
||||
gDBView.supressMsgDisplay = true;
|
||||
else
|
||||
gDBView.supressMsgDisplay = false;
|
||||
if (gDBView) {
|
||||
// the collapsed state is the state after we released the mouse
|
||||
// so we take it as it is
|
||||
gDBView.supressMsgDisplay = IsThreadAndMessagePaneSplitterCollapsed();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
dump("We are in OnClickThreadAndMessagePaneSplitter()\n");
|
||||
var collapsed = IsThreadAndMessagePaneSplitterCollapsed();
|
||||
//collapsed is the previous state so we know we are opening.
|
||||
if(collapsed)
|
||||
function OnClickThreadAndMessagePaneSplitterGrippy()
|
||||
{
|
||||
LoadSelectionIntoMessagePane();
|
||||
setTimeout("ScrollToMessage(new,true,true);",0);
|
||||
if (gDBView) {
|
||||
// the collapsed state is the state when we clicked on the grippy
|
||||
// not when afterwards, so we need to reverse this value
|
||||
gDBView.supressMsgDisplay = !IsThreadAndMessagePaneSplitterCollapsed();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function FolderPaneSelectionChange()
|
||||
|
|
|
@ -152,8 +152,9 @@ Rights Reserved.
|
|||
</box>
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
|
||||
<splitter id="threadpane-splitter" collapse="after" persist="state"
|
||||
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()"
|
||||
orient="vertical" autostretch="never">
|
||||
<grippy onclick="OnClickThreadAndMessagePaneSplitter()" />
|
||||
<grippy onclick="OnClickThreadAndMessagePaneSplitterGrippy()"/>
|
||||
</splitter>
|
||||
<!-- msg header view -->
|
||||
<box id="messagepanebox" orient="vertical" flex="4" persist="collapsed height" class="window-focusborder" focusring="false">
|
||||
|
|
|
@ -154,8 +154,9 @@ Rights Reserved.
|
|||
|
||||
<!-- if you change this id, please change GetThreadAndMessagePaneSplitter() and MsgToggleMessagePane() -->
|
||||
<splitter collapse="after" persist="state"
|
||||
onmouseup="OnMouseUpThreadAndMessagePaneSplitter()"
|
||||
id="threadpane-splitter" orient="vertical" autostretch="never">
|
||||
<grippy onclick="OnClickThreadAndMessagePaneSplitter()"/>
|
||||
<grippy onclick="OnClickThreadAndMessagePaneSplitterGrippy()"/>
|
||||
</splitter>
|
||||
|
||||
<box id="messagepanebox" align="vertical" flex="3" persist="collapsed height" class="window-focusborder" focusring="false" onclick="contentAreaClick(event);" ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);">
|
||||
|
|
|
@ -642,16 +642,16 @@ function GetTotalCountElement()
|
|||
gTotalCount = totalCount;
|
||||
return totalCount;
|
||||
}
|
||||
|
||||
function IsThreadAndMessagePaneSplitterCollapsed()
|
||||
{
|
||||
var splitter = GetThreadAndMessagePaneSplitter();
|
||||
if(splitter)
|
||||
{
|
||||
var state = splitter.getAttribute('state');
|
||||
return (state == "collapsed");
|
||||
var messagePane = GetMessagePane();
|
||||
try {
|
||||
return (messagePane.getAttribute("collapsed") == "true");
|
||||
}
|
||||
else
|
||||
catch (ex) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function FindMessenger()
|
||||
|
|
Загрузка…
Ссылка в новой задаче