Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r/a=philipp
authorMakeMyDay <makemyday@gmx-topmail.de>
Sat, 09 May 2015 16:30:30 +0200
changeset 22313 89722d50d1f15d676073dbea43fc8a31af87a1c8
parent 22312 5f331d8e5a9f5e1a532344dff873ddbfc80a6091
child 22314 b18b021faeac1d3570c49aa933e616b90413879a
push idunknown
push userunknown
push dateunknown
bugs1159698
Bug 1159698 - Opt-out dialog has a button for "disable", but actually the addon is removed;r/a=philipp
calendar/lightning/content/messenger-overlay-sidebar.js
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -209,31 +209,20 @@ function ltnIntegrationNotification() {
                     document.getElementById("messagepanebox");
 
     let appBrand = cal.calGetString("brand", "brandShortName", null, "branding");
     let ltnBrand = ltnGetString("lightning", "brandShortName");
     let label = ltnGetString("lightning", "integrationLabel", [appBrand, ltnBrand]);
 
     // call backs for doing/undoing Lightning removal
     let cbRemoveLightning = function (aAddon) {
-        try {
-            aAddon.uninstall();
-        } catch (e) {
-            aAddon.userDisabled = true;
-        }
+        aAddon.userDisabled = true;
     };
     let cbUndoRemoveLightning = function (aAddon) {
-        switch (aAddon.pendingOperations) {
-            case AddonManager.PENDING_DISABLE:
-                aAddon.userDisabled = false;
-                break;
-            case AddonManager.PENDING_UNINSTALL:
-                aAddon.cancelUninstall();
-                break;
-        }
+        aAddon.userDisabled = false;
     };
 
     // call backs for the undo opt-out bar
     let cbRestartNow = function(aNotificationBar, aButton) {
         Services.startup.quit(Components.interfaces.nsIAppStartup.eRestart |
                               Components.interfaces.nsIAppStartup.eForceQuit);
     };
     let cbUndoOptOut = function(aNotificationBar, aButton) {