diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-03-06 14:02:19 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-03-06 20:07:17 +0100 |
| commit | 1ae64793fa489b2c1d07408cd9671bc7126f78fa (patch) | |
| tree | 23d908222f4e705b908dd23ef3823c26daf3baf0 /addons/mail/static/src/js/models/threads/document_thread.js | |
| parent | aa900d976f6fbb10f3940639b4d918d31a7556ca (diff) | |
[REF] mail: adapt code after jQuery update
Part of task 1896658
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js/models/threads/document_thread.js')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/document_thread.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/mail/static/src/js/models/threads/document_thread.js b/addons/mail/static/src/js/models/threads/document_thread.js index 6c15b39d25e..08e441610ee 100644 --- a/addons/mail/static/src/js/models/threads/document_thread.js +++ b/addons/mail/static/src/js/models/threads/document_thread.js @@ -92,7 +92,7 @@ var DocumentThread = Thread.extend({ * @param {Object} options * @param {boolean} [options.forceFetch] if true, fetch anyway, as user * clicked on 'load more'. - * @returns {$.Promise<mail.model.Message[]>} + * @returns {Promise<mail.model.Message[]>} */ fetchMessages: function (options) { var self = this; @@ -217,14 +217,14 @@ var DocumentThread = Thread.extend({ * Get most up to date messageIDs * * @private - * @returns {$.Promise} resolved when message IDs have been fetched and set + * @returns {Promise} resolved when message IDs have been fetched and set * in the model */ _fetchMessageIDs: function () { var self = this; var resID = this.getDocumentID(); if (!resID || !this._mustFetchMessageIDs) { - return $.when(); + return Promise.resolve(); } return this._rpc({ model: this.getDocumentModel(), @@ -239,7 +239,7 @@ var DocumentThread = Thread.extend({ * @private * @param {Object} options * @param {boolean} [options.forceFetch] - * @returns {$.Promise} resolved when messages have been fetched + document + * @returns {Promise} resolved when messages have been fetched + document * thread has updated messages */ _fetchMessages: function (options) { @@ -273,7 +273,7 @@ var DocumentThread = Thread.extend({ }); }); } else { - return $.when(); + return Promise.resolve(); } }); @@ -284,7 +284,7 @@ var DocumentThread = Thread.extend({ * * @override * @private - * @returns {$.Promise} resolved when messages have been marked as read on + * @returns {Promise} resolved when messages have been marked as read on * the server. */ _markAsRead: function () { @@ -299,7 +299,7 @@ var DocumentThread = Thread.extend({ * @override * @private * @param {Object} data data related to the new message - * @return {$.Promise<Object>} resolved when the message has been sent to + * @return {Promise<Object>} resolved when the message has been sent to * the server, with the object message that has been sent to the server. */ _postMessage: function (data) { |
