mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 20:30:20 -06:00
[PATCH] Upstream patch - 19052022
This commit is contained in:
1 parent
528e10865e
commit
8d9034ea03
19 files changed
+102
-76
No files matched your search
@@ -55,8 +55,9 @@ class FollowButton extends Component {
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickUnfollow(ev) {
|
||||
this.thread.unfollow();
|
||||
async _onClickUnfollow(ev) {
|
||||
await this.thread.unfollow();
|
||||
this.trigger('reload', { fieldNames: ['message_follower_ids'], keepChanges: true });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ const components = {
|
||||
const useShouldUpdateBasedOnProps = require('mail/static/src/component_hooks/use_should_update_based_on_props/use_should_update_based_on_props.js');
|
||||
const useStore = require('mail/static/src/component_hooks/use_store/use_store.js');
|
||||
|
||||
const { markEventHandled } = require('mail/static/src/utils/utils.js');
|
||||
const { Component } = owl;
|
||||
|
||||
class Follower extends Component {
|
||||
@@ -61,8 +62,11 @@ class Follower extends Component {
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickRemove(ev) {
|
||||
this.follower.remove();
|
||||
async _onClickRemove(ev) {
|
||||
markEventHandled(ev, 'Follower.clickRemove');
|
||||
await this.follower.remove();
|
||||
this.trigger('reload', { fieldNames:['message_follower_ids'], keepChanges: true });
|
||||
this.trigger('o-hide-follower-list-menu');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ const components = {
|
||||
};
|
||||
const useShouldUpdateBasedOnProps = require('mail/static/src/component_hooks/use_should_update_based_on_props/use_should_update_based_on_props.js');
|
||||
const useStore = require('mail/static/src/component_hooks/use_store/use_store.js');
|
||||
const { isEventHandled } = require('mail/static/src/utils/utils.js');
|
||||
|
||||
const { Component } = owl;
|
||||
const { useRef, useState } = owl.hooks;
|
||||
@@ -133,6 +134,9 @@ class FollowerListMenu extends Component {
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onClickFollower(ev) {
|
||||
if (isEventHandled(ev, 'Follower.clickRemove')) {
|
||||
return;
|
||||
}
|
||||
this._hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
class="o_FollowerMenu_follower dropdown-item"
|
||||
followerLocalId="follower.localId"
|
||||
t-on-click="_onClickFollower"
|
||||
t-on-o-hide-follower-list-menu="_hide"
|
||||
/>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
@@ -53,7 +53,7 @@ function factory(dependencies) {
|
||||
}
|
||||
const messageIds = this.fetchedMessages.map(message => message.id);
|
||||
const fetchedMessages = this._loadMessages({
|
||||
extraDomain: [['id', '>', Math.max(...messageIds)]],
|
||||
extraDomain: [['id', '>', Math.max(...messageIds, 0)]],
|
||||
limit: false,
|
||||
});
|
||||
for (const threadView of this.threadViews) {
|
||||
|
||||
Reference in new issue
Block a user