[PATCH] Upstream patch - 22042022

This commit is contained in:
Parthiv Patel committed 2022-04-22 08:35:39 +00:00
1 parent 6213b40c4e
commit b48ac72eb8
30 files changed
+797 -366

No files matched your search

@@ -67,6 +67,7 @@ class ChatWindow extends Component {
// the following are passed as props to children
this._onAutocompleteSelect = this._onAutocompleteSelect.bind(this);
this._onAutocompleteSource = this._onAutocompleteSource.bind(this);
this._saveThreadScrollTop = this._saveThreadScrollTop.bind(this);
this._constructor(...args);
}
@@ -17,6 +17,7 @@
chatWindowLocalId="chatWindow.localId"
hasCloseAsBackButton="props.hasCloseAsBackButton"
isExpandable="props.isExpandable"
saveThreadScrollTop="_saveThreadScrollTop"
t-on-o-clicked="_onClickedHeader"
t-ref="header"
/>
@@ -85,6 +85,9 @@ class ChatWindowHeader extends Component {
*/
_onClickShiftLeft(ev) {
ev.stopPropagation();
if (this.props.saveThreadScrollTop) {
this.props.saveThreadScrollTop();
}
this.chatWindow.shiftLeft();
}
@@ -94,6 +97,9 @@ class ChatWindowHeader extends Component {
*/
_onClickShiftRight(ev) {
ev.stopPropagation();
if (this.props.saveThreadScrollTop) {
this.props.saveThreadScrollTop();
}
this.chatWindow.shiftRight();
}
@@ -109,6 +115,10 @@ Object.assign(ChatWindowHeader, {
chatWindowLocalId: String,
hasCloseAsBackButton: Boolean,
isExpandable: Boolean,
saveThreadScrollTop: {
type: Function,
optional: true,
},
},
template: 'mail.ChatWindowHeader',
});
@@ -2416,7 +2416,7 @@ QUnit.test('chat window should remain folded when new message is received', asyn
);
});
QUnit.test('chat window scroll position should remain the same after switching left', async function (assert) {
QUnit.skip('chat window scroll position should remain the same after switching left', async function (assert) {
assert.expect(2);
this.data['mail.channel'].records.push({
@@ -2474,7 +2474,7 @@ QUnit.test('chat window scroll position should remain the same after switching l
);
});
QUnit.test('chat window scroll position should remain the same after switching right', async function (assert) {
QUnit.skip('chat window scroll position should remain the same after switching right', async function (assert) {
assert.expect(2);
this.data['mail.channel'].records.push({