BUGFIX: don't force load drafts when composing.

It will still be there after post is made.
This commit is contained in:
Sam 2014-02-28 10:30:05 +11:00
parent ab17e1476b
commit 6e0e628ff5

View File

@ -38,18 +38,21 @@ function buildTopicRoute(filter) {
model: model, model: model,
category: null, category: null,
period: period, period: period,
selected: [], selected: []
}); });
// If there's a draft, open the create topic composer // If there's a draft, open the create topic composer
if (model.draft) { if (model.draft) {
this.controllerFor('composer').open({ var composer = this.controllerFor('composer');
if (!composer.get('model.viewOpen')) {
composer.open({
action: Discourse.Composer.CREATE_TOPIC, action: Discourse.Composer.CREATE_TOPIC,
draft: model.draft, draft: model.draft,
draftKey: model.draft_key, draftKey: model.draft_key,
draftSequence: model.draft_sequence draftSequence: model.draft_sequence
}); });
} }
}
this.controllerFor('navigationDefault').set('canCreateTopic', model.get('can_create_topic')); this.controllerFor('navigationDefault').set('canCreateTopic', model.get('can_create_topic'));
}, },