UX: prevent post submission when uploading

This commit is contained in:
Régis Hanol 2017-02-20 15:12:33 +01:00
parent 97116c9276
commit fd62909819
1 changed files with 3 additions and 1 deletions

View File

@ -404,13 +404,15 @@ export default Ember.Controller.extend({
disableSubmit: Ember.computed.or("model.loading", "isUploading"),
save(force) {
const composer = this.get('model');
if (this.get("disableSubmit")) return;
// Clear the warning state if we're not showing the checkbox anymore
if (!this.get('showWarning')) {
this.set('model.isWarning', false);
}
const composer = this.get('model');
if (composer.get('cantSubmitPost')) {
this.set('lastValidatedAt', Date.now());
return;