FIX: don't pop up "cancel" when returning to topic

This commit is contained in:
Sam 2014-12-22 16:08:39 +11:00
parent a75b9db4a2
commit 9e4942eeeb
1 changed files with 2 additions and 4 deletions

View File

@ -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();