half baked replace by title method

This commit is contained in:
Dan Mills 2008-12-27 12:15:26 -08:00
Родитель 71d8038a52
Коммит 00f7898db0
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -91,6 +91,16 @@ let Notifications = {
} }
// XXX Should we notify observers about weave:notification:replaced? // XXX Should we notify observers about weave:notification:replaced?
},
// replaces all existing notifications with the same title as the new one
// FIXME not working?
replaceTitle: function Notifications_replaceTitle(notification) {
for each (let old in this.notifications) {
if (old.title == notification.title)
this.remove(old);
}
this.add(notification);
} }
}; };