This commits makes sure we correctly wait for the end of the transition to reopen the drawer on the correct channel/view. Also fixes a bug when previous URL was `/` and causing a double transition.
21 lines
354 B
JavaScript
21 lines
354 B
JavaScript
import Service from "@ember/service";
|
|
|
|
export default class FullPageChat extends Service {
|
|
_previousURL = null;
|
|
_isActive = false;
|
|
|
|
enter(previousURL) {
|
|
this._previousURL = previousURL;
|
|
this._isActive = true;
|
|
}
|
|
|
|
exit() {
|
|
this._isActive = false;
|
|
return this._previousURL;
|
|
}
|
|
|
|
get isActive() {
|
|
return this._isActive;
|
|
}
|
|
}
|