(bug 42148) Saving the preferences only if they changed

Change-Id: I46a6fa85bc5ebfe6f34a957c302b1bf997cb3576
This commit is contained in:
Amir E. Aharoni
2012-11-27 00:52:41 +02:00
committed by Santhosh Thottingal
parent 027776c85f
commit ba7c921b55

View File

@@ -61,6 +61,14 @@
$.extend( $.ime.preferences, { $.extend( $.ime.preferences, {
save: function ( callback ) { save: function ( callback ) {
if ( !this.registry.isDirty ) {
if ( callback ) {
callback.call( this );
}
return;
}
inputPreferences.set( 'ime', this.registry ); inputPreferences.set( 'ime', this.registry );
inputPreferences.save( callback ); inputPreferences.save( callback );
}, },