         
         // schedule notifications
         setupNotifications(for: scheduledActivities)
-        
-        // Filter out any sections that aren't shown
-        let filters = sections.mapAndFilter({ filterPredicate(for: $0) })
-        let includedSections = NSCompoundPredicate(orPredicateWithSubpredicates: filters)
         
         // Filter the scheduled activities to only include those that *this* version of the app is designed
         // to be able to handle. Currently, that means only taskReference activities with an identifier that
         // maps to a known task.
         self.activities = scheduledActivities.filter({ (schedule) -> Bool in
-            return bridgeInfo.taskReferenceForSchedule(schedule) != nil && includedSections.evaluate(with: schedule)
+            return bridgeInfo.taskReferenceForSchedule(schedule) != nil &&
+                self.scheduleFilterPredicate.evaluate(with: schedule)
         })
         
         // reload table

    open func setupNotifications(for scheduledActivities: [SBBScheduledActivity]) {
        // schedule notifications
        SBANotificationsManager.shared.setupNotifications(for: scheduledActivities)
    }
    
    /**
     Array of `SBBScheduledActivity` objects for a given table section
     
     @param     tableSection    The section index into the table (maps to IndexPath)
     @return                    The list of `SBBScheduledActivity` objects for this table section.
     */
    @objc(scheduledActivitiesForTableSection:)
    open func scheduledActivities(for tableSection: Int) -> [SBBScheduledActivity] {
        guard let predicate = filterPredicate(for: tableSection) else { return [] }
        return activities.filter({ predicate.evaluate(with: $0) })
    }
    
    private func scheduledActivitySection(for tableSection: Int) -> SBAScheduledActivitySection? {
        guard tableSection < sections.count else { return nil }
        return sections[tableSection]
    }

    /**
     Predicate to use to filter the activities for a given table section
     
     @param     tableSection    The section index into the table (maps to IndexPath)
     @return                    The predicate to use to filter the table section
     */
    @objc(filterPredicateForTableSection:)
    open func filterPredicate(for tableSection: Int) -> NSPredicate? {
        guard let section = scheduledActivitySection(for: tableSection) else { return nil }
        return filterPredicate(for: section)
    }
    
    private func filterPredicate(for section: SBAScheduledActivitySection) -> NSPredicate? {
        switch section {

        case .expiredYesterday:
            // expired yesterday section only showns those expired tasks that are also unfinished
            return SBBScheduledActivity.expiredYesterdayPredicate()
            
        case .today:
            return NSCompoundPredicate(andPredicateWithSubpredicates: [
                NSCompoundPredicate(notPredicateWithSubpredicate: SBBScheduledActivity.optionalPredicate()),
                SBBScheduledActivity.availableTodayPredicate()])
            
        case .keepGoing:
            // Keep going section includes optional tasks that are either unfinished or were finished today
            return NSCompoundPredicate(andPredicateWithSubpredicates: [
                SBBScheduledActivity.optionalPredicate(),
                SBBScheduledActivity.unfinishedPredicate(),
                SBBScheduledActivity.availableTodayPredicate()])
        
        case .tomorrow:
            // scheduled for tomorrow only
            return SBBScheduledActivity.scheduledTomorrowPredicate()
        
        case .comingUp:
            return SBBScheduledActivity.scheduledComingUpPredicate(numberOfDays: self.daysAhead)
            
        case .none:
            return nil
        }
    }
    
    /**

 Default data source handler for scheduled activities. This manager is intended to get `SBBScheduledActivity`
 objects from the Bridge server and can present the associated tasks.
 */
open class SBABaseScheduledActivityManager: NSObject, ORKTaskViewControllerDelegate {

    /**
     The delegate is required for presenting tasks and refreshing the UI.
    */
