Skip to content

Commit

Permalink
Merge branch 'pu/cw/skipStateSaes' into '2023.11'
Browse files Browse the repository at this point in the history
tweak(Tinebase): skip useless state saves

See merge request tine20/tine20!5597
  • Loading branch information
corneliusweiss committed Jul 4, 2024
2 parents e4e2244 + 40c017b commit fa677f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tine20/Tinebase/js/StateProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Ext.extend(Tine.Tinebase.StateProvider, Ext.state.Provider, {
const currentStateEncodedValue = this.encodeValue(this.state[name]);

if (!this.state[name] || (currentStateEncodedValue !== encodedValue)) {
this.state[name] = value; // prevent further state calls during state is saved
// persistent save
await Tine.Tinebase.setState(name, encodedValue);
}
Expand Down

0 comments on commit fa677f6

Please sign in to comment.