mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
BUGFIX: don't force load drafts when composing.
It will still be there after post is made.
This commit is contained in:
parent
ab17e1476b
commit
6e0e628ff5
@ -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'));
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user