MDL-64342 core_message: make ajax call when privacy setting is changed
authorcescobedo <carlos.escobedo@gmail.com>
Sun, 3 Mar 2019 22:23:04 +0000 (23:23 +0100)
committercescobedo <carlos.escobedo@gmail.com>
Sun, 3 Mar 2019 22:23:04 +0000 (23:23 +0100)
Only fire ajax request when the privacy setting value is changed.

message/amd/build/message_drawer_view_settings.min.js
message/amd/src/message_drawer_view_settings.js

index 063d2f6..c7e4a96 100644 (file)
Binary files a/message/amd/build/message_drawer_view_settings.min.js and b/message/amd/build/message_drawer_view_settings.min.js differ
index 6abe7ef..5c929d7 100644 (file)
@@ -156,7 +156,7 @@ function(
             savePreferences(loggedInUserId, preferences);
         });
 
-        settingsContainer.on(CustomEvents.events.activate, SELECTORS.PRIVACY_PREFERENCE, function(e) {
+        settingsContainer.on('change', SELECTORS.PRIVACY_PREFERENCE, function(e) {
             var newValue = $(e.target).val();
             var preferences = [
                 {