diff --git a/gui/default/syncthing/core/notificationDirective.js b/gui/default/syncthing/core/notificationDirective.js
index fc7810f6e..e3a4dd24c 100644
--- a/gui/default/syncthing/core/notificationDirective.js
+++ b/gui/default/syncthing/core/notificationDirective.js
@@ -2,20 +2,13 @@ angular.module('syncthing.core')
.directive('notification', function () {
return {
restrict: 'E',
- scope: true,
+ scope: {},
transclude: true,
template: '
',
link: function (scope, elm, attrs) {
scope.visible = function () {
- return scope.config.options.unackedNotificationIDs.indexOf(attrs.id) > -1;
- }
- scope.dismiss = function () {
- var idx = scope.config.options.unackedNotificationIDs.indexOf(attrs.id);
- if (idx > -1) {
- scope.config.options.unackedNotificationIDs.splice(idx, 1);
- scope.saveConfig();
- }
- }
+ return scope.$parent.config.options.unackedNotificationIDs.indexOf(attrs.id) > -1;
+ };
}
};
});
diff --git a/gui/default/syncthing/core/notifications.html b/gui/default/syncthing/core/notifications.html
index 34b437a72..55987ab89 100644
--- a/gui/default/syncthing/core/notifications.html
+++ b/gui/default/syncthing/core/notifications.html
@@ -6,7 +6,7 @@
This is an example notification. ID of the notification should be appended to Options.UnackedNotificationIDs of the config.