UX: better help text for composer collapse / discard

also: warn on collapsed close if you are to discard content
This commit is contained in:
Sam
2017-11-30 12:28:00 +11:00
parent 0d34caff85
commit bf1f6c7fe4
5 changed files with 22 additions and 15 deletions
@@ -303,15 +303,18 @@ export default Ember.Controller.extend({
// Toggle the reply view
toggle() {
this.closeAutocomplete();
if (this.get('model.composeState') === Composer.OPEN) {
if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
this.close();
} else {
this.shrink();
}
} else {
if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
this.close();
} else {
if (this.get('model.composeState') === Composer.OPEN) {
this.shrink();
} else {
debugger;
this.cancelComposer();
}
}
return false;
},