@@ -34,7 +32,6 @@
diff --git a/addons/mail/static/src/models/call_sidebar_view.js b/addons/mail/static/src/models/call_sidebar_view.js
new file mode 100644
index 00000000000..5b5385c3db3
--- /dev/null
+++ b/addons/mail/static/src/models/call_sidebar_view.js
@@ -0,0 +1,16 @@
+/** @odoo-module **/
+
+import { registerModel } from '@mail/model/model_core';
+import { one } from '@mail/model/model_field';
+
+registerModel({
+ name: 'CallSidebarView',
+ identifyingFields: ['callView'],
+ fields: {
+ callView: one('CallView', {
+ inverse: 'callSidebarView',
+ required: true,
+ readonly: true,
+ })
+ },
+});
diff --git a/addons/mail/static/src/models/call_view.js b/addons/mail/static/src/models/call_view.js
index b9245d83b9e..8d4b8608725 100644
--- a/addons/mail/static/src/models/call_view.js
+++ b/addons/mail/static/src/models/call_view.js
@@ -180,6 +180,13 @@ registerModel({
// if we are in minimized mode (round avatar frames), we treat the cards like squares.
return this.isMinimized ? 1 : aspectRatio;
},
+ /**
+ * @private
+ */
+ _computeCallSideBarView() {
+ const willShowSidebar = this.hasSidebar;
+ return willShowSidebar ? insertAndReplace() : clear();
+ },
/**
* @private
*/
@@ -321,6 +328,12 @@ registerModel({
default: 16 / 9,
compute: '_computeAspectRatio',
}),
+ callSidebarView: one('CallSidebarView', {
+ compute: '_computeCallSideBarView',
+ inverse: 'callView',
+ isCausal: true,
+ readonly: true,
+ }),
tileContainerRef: attr(),
/**
* Determines whether we only display the videos or all the participants