Skip to content

Commit

Permalink
fix(contacts): can now reset contacts categories more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
QHivert committed Apr 10, 2024
1 parent 49e9988 commit 526aa28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UI/WebServerResources/js/Preferences/PreferencesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
};

this.resetContactsCategories = function(form) {
this.preferences.defaults.SOGoContactsCategories = $window.defaultContactsCategories;
this.preferences.defaults.SOGoContactsCategories = $window.defaultContactsCategories.slice();
form.$setDirty();
};

Expand Down Expand Up @@ -104,10 +104,10 @@
var i = _.indexOf(this.preferences.defaults.SOGoContactsCategories, "");
if (i < 0) {
this.preferences.defaults.SOGoContactsCategories.push("");
form.$setDirty();
i = this.preferences.defaults.SOGoContactsCategories.length - 1;
}
focus('contactCategory_' + i);
form.$setDirty();
};

this.removeContactCategory = function(index, form) {
Expand Down

0 comments on commit 526aa28

Please sign in to comment.