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