FIX: don't pop up "cancel" when returning to topic
This commit is contained in:
parent
a75b9db4a2
commit
9e4942eeeb
|
@ -336,15 +336,13 @@ export default DiscourseController.extend({
|
||||||
|
|
||||||
// If we're already open, we don't have to do anything
|
// If we're already open, we don't have to do anything
|
||||||
if (composerModel.get('composeState') === Discourse.Composer.OPEN &&
|
if (composerModel.get('composeState') === Discourse.Composer.OPEN &&
|
||||||
composerModel.get('draftKey') === opts.draftKey &&
|
composerModel.get('draftKey') === opts.draftKey) {
|
||||||
composerModel.action === opts.action) {
|
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's the same draft, just open it up again.
|
// If it's the same draft, just open it up again.
|
||||||
if (composerModel.get('composeState') === Discourse.Composer.DRAFT &&
|
if (composerModel.get('composeState') === Discourse.Composer.DRAFT &&
|
||||||
composerModel.get('draftKey') === opts.draftKey &&
|
composerModel.get('draftKey') === opts.draftKey) {
|
||||||
composerModel.action === opts.action) {
|
|
||||||
|
|
||||||
composerModel.set('composeState', Discourse.Composer.OPEN);
|
composerModel.set('composeState', Discourse.Composer.OPEN);
|
||||||
return resolve();
|
return resolve();
|
||||||
|
|
Loading…
Reference in New Issue