mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 19:23:36 +08:00
FIX: close panel earlier (#21512)
deactivate was happening too late and sometimes after we did reopen for next panel causing the panel to stay effectively closed
This commit is contained in:
parent
bd6e487df0
commit
e905de66ff
|
@ -1,5 +1,6 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { action } from "@ember/object";
|
||||
|
||||
export default class ChatChannelThread extends DiscourseRoute {
|
||||
@service router;
|
||||
|
@ -24,7 +25,8 @@ export default class ChatChannelThread extends DiscourseRoute {
|
|||
this.chatChannelThreadPane.open(model);
|
||||
}
|
||||
|
||||
deactivate() {
|
||||
@action
|
||||
willTransition() {
|
||||
this.chatChannelThreadPane.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
import DiscourseRoute from "discourse/routes/discourse";
|
||||
import { inject as service } from "@ember/service";
|
||||
|
||||
import { action } from "@ember/object";
|
||||
export default class ChatChannelThreads extends DiscourseRoute {
|
||||
@service router;
|
||||
@service chatChannelThreadListPane;
|
||||
|
||||
deactivate() {
|
||||
this.chatChannelThreadListPane.close();
|
||||
}
|
||||
|
||||
beforeModel(transition) {
|
||||
const channel = this.modelFor("chat.channel");
|
||||
|
||||
|
@ -19,6 +15,11 @@ export default class ChatChannelThreads extends DiscourseRoute {
|
|||
}
|
||||
}
|
||||
|
||||
@action
|
||||
willTransition() {
|
||||
this.chatChannelThreadListPane.close();
|
||||
}
|
||||
|
||||
activate() {
|
||||
this.chatChannelThreadListPane.open();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user