         let fetchRequest = NSFetchRequest(entityName: NCNotification.entityName)
         fetchRequest.predicate = NSPredicate(value: true)
         fetchRequest.includesPropertyValues = false
-        let results = try! persistenceSetup.context.executeFetchRequest(fetchRequest)
-        for notif in (results as! [NCNotification]){
+        let results = try! persistenceSetup.context.executeFetchRequest(fetchRequest) as! [NCNotification]
+        observer?.notificationsWillBeRemoved(results)
+        for notif in (results){
             
             persistenceSetup.context.deleteObject(notif)
 

                
                try persistenceSetup.context.save()
                callback(nil)
                
            } catch {
                

            
            try persistenceSetup.context.save()
            callback(nil)
            observer?.notificationAdded(notif)
        
        }
        catch {
