From 9706bbce4ded3b5038e13540a77cf8b397f06dc9 Mon Sep 17 00:00:00 2001 From: drewprice Date: Thu, 18 May 2017 15:08:55 -0400 Subject: [PATCH] Attempt disable only if bundled and not already disabled --- lib/main.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/main.coffee b/lib/main.coffee index 6da9da99..72bd48f3 100644 --- a/lib/main.coffee +++ b/lib/main.coffee @@ -4,6 +4,12 @@ StackTraceParser = null {app} = require 'remote' coreAppIsAtom = app.getName().match(/atom/i)? +isBundledPackageEnabled = (name) -> + isDisabled = atom.packages.isPackageDisabled(name) + isBundled = atom.packages.isBundledPackage(name) + + isBundled and not isDisabled + Notifications = isInitialized: false subscriptions: null @@ -14,7 +20,7 @@ Notifications = if coreAppIsAtom return - if not atom.packages.isPackageDisabled('notifications') + if isBundledPackageEnabled('notifications') atom.packages.disablePackage('notifications') atom.restartApplication()