(js) Fix mail draft autosave in preferences

Fixes #3519
This commit is contained in:
Francis Lachapelle
2016-02-11 11:40:36 -05:00
parent d7b010526b
commit c8ea2000d8
3 changed files with 6 additions and 1 deletions
@@ -594,7 +594,8 @@
<div layout="row" layout-align="start center">
<p><var:string label:value="Auto save every"/></p>
<md-input-container class="md-input-number" md-no-float="md-no-float">
<input type="number" min="0" label:aria-label="minutes" ng-model="preferences.defaults.SOGoMailAutoSave"/>
<input type="number" min="0" label:aria-label="minutes"
ng-model="app.preferences.defaults.SOGoMailAutoSave"/>
</md-input-container>
<var:string label:value="minutes"/>
</div>
@@ -23,6 +23,9 @@
data.SOGoMailLabelsColors = labels;
// Mail editor autosave is a number of minutes or 0 if disabled
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;
// We convert our list of autoReplyEmailAddresses/forwardAddress into a string.
// We also convert our date objects into real date, otherwise we'll have strings
// or undefined values and the md-datepicker does NOT like this.