diff --git a/OpenStack Summit/CoreSummit/EventManagedObject.swift b/OpenStack Summit/CoreSummit/EventManagedObject.swift index 9bcb90b9..cac6d23b 100644 --- a/OpenStack Summit/CoreSummit/EventManagedObject.swift +++ b/OpenStack Summit/CoreSummit/EventManagedObject.swift @@ -195,6 +195,7 @@ public extension EventManagedObject { tracks: [Identifier] = [], trackGroups: [Identifier] = [], levels: [Level] = [], + rooms: [Identifier] = [], venues: [Identifier] = [], summit: Identifier, context: NSManagedObjectContext) throws -> [EventManagedObject] { @@ -238,6 +239,14 @@ public extension EventManagedObject { predicates.append(levelsPredicate) } + if rooms.isEmpty == false { + + //let roomsPredicate = NSPredicate(format: "location.id IN %@", rooms) + let roomsPredicate: Predicate = (#keyPath(EventManagedObject.location.id)).in(rooms) + + predicates.append(roomsPredicate) + } + if venues.isEmpty == false { // NSPredicate(format: "venue.id IN %@", venues) diff --git a/OpenStack Summit/CoreSummit/VenueRoomManagedObject.swift b/OpenStack Summit/CoreSummit/VenueRoomManagedObject.swift index 1910f43d..230f544c 100644 --- a/OpenStack Summit/CoreSummit/VenueRoomManagedObject.swift +++ b/OpenStack Summit/CoreSummit/VenueRoomManagedObject.swift @@ -8,6 +8,7 @@ import Foundation import CoreData +import Predicate public final class VenueRoomManagedObject: LocationManagedObject { @@ -48,3 +49,42 @@ extension VenueRoom: CoreDataEncodable { return managedObject } } + +// MARK - Fetches + +public extension VenueRoomManagedObject { + + static var sortDescriptors: [NSSortDescriptor] { + + return [NSSortDescriptor(key: #keyPath(VenueRoomManagedObject.name), ascending: true)] + } +} + +public extension VenueRoom { + + /// Fetch all rooms that have some event associated with them. + static func scheduled(for summit: Identifier, context: NSManagedObjectContext) throws -> [VenueRoom] { + + // NSPredicate(format: "location != nil AND summit == %@", summitManagedObject)) + let eventsPredicate: Predicate = .keyPath(#keyPath(EventManagedObject.location)) != .value(.null) + && #keyPath(EventManagedObject.summit.id) == summit + + let events = try context.managedObjects(EventManagedObject.self, predicate: eventsPredicate) + + let locations = Set(events.compactMap({ $0.location })) + .sorted(by: { $0.name < $1.name }) + + var rooms = [VenueRoomManagedObject]() + + for location in locations { + + if let room = location as? VenueRoomManagedObject { + + rooms.append(room) + } + } + + return VenueRoom.from(managedObjects: rooms) + } +} + diff --git a/OpenStack Summit/OpenStack Summit.xcodeproj/project.pbxproj b/OpenStack Summit/OpenStack Summit.xcodeproj/project.pbxproj index 73f25ab6..b1e33bcf 100644 --- a/OpenStack Summit/OpenStack Summit.xcodeproj/project.pbxproj +++ b/OpenStack Summit/OpenStack Summit.xcodeproj/project.pbxproj @@ -5330,6 +5330,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; + DISPLAY_NAME = "Open Infrastructure Summit"; FRAMEWORK_SEARCH_PATHS = $SRCROOT/../Carthage/Build/WatchOS; IBSC_MODULE = OpenStackSummitWatch_Extension; INFOPLIST_FILE = OpenStackSummitWatch/Info.plist; @@ -5518,6 +5519,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = "$(CONFIGURATION).entitlements"; CODE_SIGN_IDENTITY = "iPhone Developer"; + DISPLAY_NAME = "Open Infrastracture Summit"; FRAMEWORK_SEARCH_PATHS = ( $SRCROOT/../Carthage/Build/iOS, $SRCROOT/../Vendor, diff --git a/OpenStack Summit/OpenStack Summit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/OpenStack Summit/OpenStack Summit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/OpenStack Summit/OpenStack Summit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/OpenStack Summit/OpenStack Summit.xcodeproj/xcshareddata/xcschemes/OpenStack Summit.xcscheme b/OpenStack Summit/OpenStack Summit.xcodeproj/xcshareddata/xcschemes/OpenStack Summit.xcscheme index cd57aae3..9a7abd0e 100644 --- a/OpenStack Summit/OpenStack Summit.xcodeproj/xcshareddata/xcschemes/OpenStack Summit.xcscheme +++ b/OpenStack Summit/OpenStack Summit.xcodeproj/xcshareddata/xcschemes/OpenStack Summit.xcscheme @@ -26,7 +26,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" shouldUseLaunchSchemeArgsEnv = "YES"> Bool { // print app info - print("Launching OpenStack Summit v\(AppVersion) Build \(AppBuild)") + print("Launching OpenInfrastructure Summit v\(AppVersion) Build \(AppBuild)") print("Using Environment: \(AppEnvironment.rawValue)") // update app build preference diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.jpeg b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.jpeg new file mode 100644 index 00000000..598d836f Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.jpeg differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.png index 946cff11..92bcc615 100644 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.png and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/AppStore.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/Contents.json b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/Contents.json index bcc2a289..0c197bd0 100644 --- a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,49 +1,51 @@ { "images" : [ { - "idiom" : "iphone", "size" : "20x20", + "idiom" : "iphone", + "filename" : "iPhone_Notification_iOS7-12@2x.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "20x20", + "idiom" : "iphone", + "filename" : "iPhone_Notification_iOS7-12@3x.png", "scale" : "3x" }, { "size" : "29x29", "idiom" : "iphone", - "filename" : "iPhone_Spotlight@2x.png", + "filename" : "iPhone_Settings_iOS7-12@2x.png", "scale" : "2x" }, { "size" : "29x29", "idiom" : "iphone", - "filename" : "iPhone_Spotlight@3x.png", + "filename" : "iPhone_Settings_iOS7-12@3x.png", "scale" : "3x" }, { "size" : "40x40", "idiom" : "iphone", - "filename" : "iPhone_Spotlight_iOS7-9@2x.png", + "filename" : "iPhone_Spotlight_iOS7-12@2x.png", "scale" : "2x" }, { "size" : "40x40", "idiom" : "iphone", - "filename" : "iPhone_Spotlight_iOS7-9@3x.png", + "filename" : "iPhone_Spotlight_iOS7-12@3x.png", "scale" : "3x" }, { "size" : "60x60", "idiom" : "iphone", - "filename" : "iPhone_App_iOS7-9@2x.png", + "filename" : "iPhone_App_iOS7-12@2x.png", "scale" : "2x" }, { "size" : "60x60", "idiom" : "iphone", - "filename" : "iPhone_App_iOS7-9@3x.png", + "filename" : "iPhone_App_iOS7-12@3x.png", "scale" : "3x" }, { @@ -52,8 +54,9 @@ "scale" : "1x" }, { - "idiom" : "ipad", "size" : "20x20", + "idiom" : "ipad", + "filename" : "iPad_Notifications_iOS7-12@2x.png", "scale" : "2x" }, { @@ -71,37 +74,37 @@ { "size" : "40x40", "idiom" : "ipad", - "filename" : "iPad_Spotlight_iOS7-9.png", + "filename" : "iPad_Spotlight_iOS7-12.png", "scale" : "1x" }, { "size" : "40x40", "idiom" : "ipad", - "filename" : "iPad_Spotlight_iOS7-9@2x.png", + "filename" : "iPad_Spotlight_iOS7-12@2x.png", "scale" : "2x" }, { "size" : "76x76", "idiom" : "ipad", - "filename" : "iPad_App_iOS7-9.png", + "filename" : "iPad_App_iOS7-12.png", "scale" : "1x" }, { "size" : "76x76", "idiom" : "ipad", - "filename" : "iPad_App_iOS7-9@2x.png", + "filename" : "iPad_App_iOS7-12@2x.png", "scale" : "2x" }, { "size" : "83.5x83.5", "idiom" : "ipad", - "filename" : "iPad_ProApp_iOS9@2x.png", + "filename" : "iPad_ProApp_iOS12@2x.png", "scale" : "2x" }, { "size" : "1024x1024", "idiom" : "ios-marketing", - "filename" : "AppStore.png", + "filename" : "AppStore.jpeg", "scale" : "1x" } ], diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12.png new file mode 100644 index 00000000..b1ce1862 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12@2x.png new file mode 100644 index 00000000..a68f7dd7 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9.png deleted file mode 100644 index 4c3d0fde..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9@2x.png deleted file mode 100644 index b04f1e7d..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_App_iOS7-9@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Notifications_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Notifications_iOS7-12@2x.png new file mode 100644 index 00000000..8e95224f Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Notifications_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS12@2x.png new file mode 100644 index 00000000..161928a8 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS9@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS9@2x.png deleted file mode 100644 index 9e757078..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_ProApp_iOS9@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings.png index 70cf378d..48525c91 100644 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings.png and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings@2x.png index f39a8ea5..8e2d0530 100644 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings@2x.png and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Settings@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12.png new file mode 100644 index 00000000..8e95224f Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12@2x.png new file mode 100644 index 00000000..3e82a6da Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9.png deleted file mode 100644 index 8484b3a9..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9@2x.png deleted file mode 100644 index f91ab196..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPad_Spotlight_iOS7-9@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@2x.png new file mode 100644 index 00000000..af8c62ed Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@3x.png new file mode 100644 index 00000000..3cf5a039 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-12@3x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@2x.png deleted file mode 100644 index 3a795700..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@3x.png deleted file mode 100644 index 0ff3b0f4..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_App_iOS7-9@3x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@2x.png new file mode 100644 index 00000000..8e95224f Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@3x.png new file mode 100644 index 00000000..f46f0a9d Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Notification_iOS7-12@3x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@2x.png new file mode 100644 index 00000000..8e2d0530 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@3x.png new file mode 100644 index 00000000..70592d27 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Settings_iOS7-12@3x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@2x.png deleted file mode 100644 index f39a8ea5..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@3x.png deleted file mode 100644 index 3843432c..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight@3x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@2x.png new file mode 100644 index 00000000..3e82a6da Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@2x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@3x.png new file mode 100644 index 00000000..af8c62ed Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-12@3x.png differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@2x.png deleted file mode 100644 index f91ab196..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@3x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@3x.png deleted file mode 100644 index 3a795700..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/AppIcon.appiconset/iPhone_Spotlight_iOS7-9@3x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/Contents.json b/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/Contents.json index dd61946a..c369d6fc 100644 --- a/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/Contents.json +++ b/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/Contents.json @@ -2,16 +2,7 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "summit-logo@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" + "filename" : "logo.pdf" } ], "info" : { diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/logo.pdf b/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/logo.pdf new file mode 100644 index 00000000..bd60ada0 Binary files /dev/null and b/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/logo.pdf differ diff --git a/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/summit-logo@2x.png b/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/summit-logo@2x.png deleted file mode 100644 index e4ff6696..00000000 Binary files a/OpenStack Summit/OpenStack Summit/Assets.xcassets/summit-logo.imageset/summit-logo@2x.png and /dev/null differ diff --git a/OpenStack Summit/OpenStack Summit/Filter.swift b/OpenStack Summit/OpenStack Summit/Filter.swift index 0e34b318..625a147d 100644 --- a/OpenStack Summit/OpenStack Summit/Filter.swift +++ b/OpenStack Summit/OpenStack Summit/Filter.swift @@ -27,6 +27,9 @@ enum FilterCategory { /// VENUE case venue + + /// ROOM + case room } enum Filter { @@ -38,6 +41,40 @@ enum Filter { case trackGroup(Identifier) case level(Level) case venue(Identifier) + case room(Identifier) + + public var identifier: Identifier? { + + switch self { + case let .track(identifier): return identifier + case let .trackGroup(identifier): return identifier + case let .venue(identifier): return identifier + case let .room(identifier): return identifier + default: return nil + } + } + + public var category: FilterCategory { + + switch self { + case .activeTalks: return .activeTalks + case .video: return .activeTalks + case .track: return .track + case .trackGroup: return .trackGroup + case .level: return .level + case .venue: return .venue + case .room: return .room + } + } + + public var parentCategory: FilterCategory? { + + switch self { + case .track: return .trackGroup + case .room: return .venue + default: return nil + } + } } extension Filter: Hashable { @@ -58,6 +95,7 @@ func == (lhs: Filter, rhs: Filter) -> Bool { case let (.track(lhsValue), .track(rhsValue)): return lhsValue == rhsValue case let (.level(lhsValue), .level(rhsValue)): return lhsValue == rhsValue case let (.venue(lhsValue), .venue(rhsValue)): return lhsValue == rhsValue + case let (.room(lhsValue), .room(rhsValue)): return lhsValue == rhsValue default: return false } } @@ -109,9 +147,18 @@ struct ScheduleFilter: Equatable { .flatMap { Level(rawValue: $0) } .sorted() - let venues = try! context.managedObjects(Venue.self, - predicate: #keyPath(VenueManagedObject.summit.id) == summitID, - sortDescriptors: VenueManagedObject.sortDescriptors) + var rooms = [VenueRoom]() + var venues = [Venue]() + + if let startShowingVenues = summit.startShowingVenues, + NSDate().mt_is(after: startShowingVenues) { + + rooms = try! VenueRoom.scheduled(for: summitID, context: context) + + venues = try! context.managedObjects(Venue.self, + predicate: #keyPath(VenueManagedObject.summit.id) == summitID, + sortDescriptors: VenueManagedObject.sortDescriptors) + } // populate filter categories @@ -146,6 +193,11 @@ struct ScheduleFilter: Equatable { allFilters[.level] = levels.map { .level($0) } } + if rooms.isEmpty == false { + + allFilters[.room] = rooms.map { .room($0.identifier) } + } + if venues.isEmpty == false { allFilters[.venue] = venues.map { .venue($0.identifier) } diff --git a/OpenStack Summit/OpenStack Summit/GeneralScheduleFilterViewController.swift b/OpenStack Summit/OpenStack Summit/GeneralScheduleFilterViewController.swift index 5134c636..edd60dea 100644 --- a/OpenStack Summit/OpenStack Summit/GeneralScheduleFilterViewController.swift +++ b/OpenStack Summit/OpenStack Summit/GeneralScheduleFilterViewController.swift @@ -15,42 +15,30 @@ final class GeneralScheduleFilterViewController: UITableViewController { // MARK: - Properties + public var groupRow: GroupRow? = nil + private var filters = [Section]() private var filterObserver: Int? - private var trackGroup: Identifier? = nil - // MARK: - Accesors private var sections: [Section] { get { - return self.filters.filter { + if let groupRow = self.groupRow { - switch $0.category { - - case .track: return self.trackGroup != nil - default: return self.trackGroup == nil + return self.filters.filter { + switch $0.type { + case .rows(let rows): return rows.first?.filter.parentCategory == groupRow.filter.category + default: return false + } } } - } - } - - var trackGroupItem: GroupItem? = nil { - - willSet { - guard let groupItem = newValue else { return } - - switch groupItem.filter { - - case let .trackGroup(identifier): self.trackGroup = identifier - default: return - - } + return self.filters } } @@ -106,17 +94,30 @@ final class GeneralScheduleFilterViewController: UITableViewController { switch section.type { - case let .filter(items): + case .rows(let rows): + + let row = rows[indexPath.row] + + if sender.isOn { + + FilterManager.shared.filter.value.enable(row.filter) + + } else { + + FilterManager.shared.filter.value.disable(row.filter) + } + + case .mixed(let rows): - let item = items[indexPath.row] + guard let row = rows[indexPath.row] as? Row else { return } if sender.isOn { - FilterManager.shared.filter.value.enable(item.filter) + FilterManager.shared.filter.value.enable(row.filter) } else { - FilterManager.shared.filter.value.disable(item.filter) + FilterManager.shared.filter.value.disable(row.filter) } default: break @@ -132,10 +133,10 @@ final class GeneralScheduleFilterViewController: UITableViewController { private func configureNavigationBar() { - if let groupItem = self.trackGroupItem { + if let groupRow = self.groupRow { self.navigationItem.leftBarButtonItem = nil - self.title = groupItem.name.uppercased() + self.title = groupRow.name.uppercased() } else { self.setBlankBackBarButtonItem() } } @@ -155,6 +156,7 @@ final class GeneralScheduleFilterViewController: UITableViewController { case let .track(identifier): return identifier case let .trackGroup(identifier): return identifier case let .venue(identifier): return identifier + case let .room(identifier): return identifier default: fatalError("Invalid filter: \(filter)") } } @@ -171,9 +173,9 @@ final class GeneralScheduleFilterViewController: UITableViewController { if let activeTalksSection = scheduleFilter.allFilters[.activeTalks] { - let items = activeTalksSection.map { Item(filter: $0, name: name(for: $0), enabled: scheduleFilter.activeFilters.contains($0)) } + let rows = activeTalksSection.map { Row(filter: $0, name: name(for: $0), enabled: scheduleFilter.activeFilters.contains($0)) } - filters.append(Section(category: .activeTalks, type: .filter(items))) + filters.append(Section(category: .activeTalks, type: .rows(rows))) } if let trackGroupsSection = scheduleFilter.allFilters[.trackGroup] { @@ -204,20 +206,22 @@ final class GeneralScheduleFilterViewController: UITableViewController { let trackGroups = try! context.managedObjects(TrackGroup.self, predicate: predicate, sortDescriptors: TrackGroup.ManagedObject.sortDescriptors) - let groupItems = trackGroups.map { trackGroup in + let groupRows = trackGroups.map { trackGroup in - GroupItem(filter: .trackGroup(trackGroup.identifier), + GroupRow(filter: .trackGroup(trackGroup.identifier), name: trackGroup.name, color: trackGroup.color, - items: tracks + rows: tracks .filter { $0.groups.contains(trackGroup.identifier) } - .map { Item(filter: .track($0.identifier), name: $0.name, enabled: true ) } ) + .map { Row(filter: .track($0.identifier), name: $0.name, enabled: true ) } ) } - filters.append(Section(category: .trackGroup, type: .group(groupItems))) + filters.append(Section(category: .trackGroup, type: .groups(groupRows))) } - if let trackGroup = self.trackGroup, + if let groupRow = self.groupRow, + groupRow.filter.category == .trackGroup, + let trackGroup = groupRow.filter.identifier, let tracksSection = scheduleFilter.allFilters[.track] { // fetch from CoreData because it caches fetch request results and is more efficient @@ -233,57 +237,146 @@ final class GeneralScheduleFilterViewController: UITableViewController { let tracks = try! context.managedObjects(Track.self, predicate: predicate, sortDescriptors: Track.ManagedObject.sortDescriptors) - let items = tracks.map { Item(filter: .track($0.identifier), name: $0.name, enabled: scheduleFilter.activeFilters.contains(.track($0.identifier))) } + let rows = tracks.map { Row(filter: .track($0.identifier), name: $0.name, enabled: scheduleFilter.activeFilters.contains(.track($0.identifier))) } - filters.append(Section(category: .track, type: .filter(items))) + filters.append(Section(category: .track, type: .rows(rows))) } if let levelsSection = scheduleFilter.allFilters[.level] { - let items = levelsSection.map { Item(filter: $0, name: name(for: $0), enabled: scheduleFilter.activeFilters.contains($0)) } + let rows = levelsSection.map { Row(filter: $0, name: name(for: $0), enabled: scheduleFilter.activeFilters.contains($0)) } - filters.append(Section(category: .level, type: .filter(items))) + filters.append(Section(category: .level, type: .rows(rows))) } if let venuesSection = scheduleFilter.allFilters[.venue] { + var rooms = [VenueRoom]() + + if let _ = scheduleFilter.allFilters[.room] { + + // fetch from CoreData because it caches fetch request results and is more efficient + let identifiers = scheduleFilter.activeFilters.filter { + switch $0 { + case .room: return true + default: return false + } + }.map { identifier(for: $0) } + + //let predicate = NSPredicate(format: "id IN %@", identifiers) + let predicate: Predicate = (#keyPath(VenueRoomManagedObject.id)).in(identifiers) + + rooms = try! context.managedObjects(VenueRoom.self, predicate: predicate, sortDescriptors: VenueRoom.ManagedObject.sortDescriptors) + } + // fetch from CoreData because it caches fetch request results and is more efficient let identifiers = venuesSection.map { identifier(for: $0) } //let predicate = NSPredicate(format: "id IN %@", identifiers) let predicate: Predicate = (#keyPath(VenueManagedObject.id)).in(identifiers) - let venues = try! context.managedObjects(Venue.self, predicate: predicate, sortDescriptors: Venue.ManagedObject.sortDescriptors) + var venues = try! context.managedObjects(Venue.self, predicate: predicate, sortDescriptors: Venue.ManagedObject.sortDescriptors) + + venues = venues.sorted { + + var roomsCount0 = 0; + + for floor in $0.floors { + + roomsCount0 += floor.rooms.count + } + + var roomsCount1 = 0; + + for floor in $1.floors { + + roomsCount1 += floor.rooms.count + } + + return roomsCount0 > roomsCount1 + } + + let rows: [FilterRow] = venues.map { venue in + + var roomsCount = 0 + + for floor in venue.floors { + + roomsCount += floor.rooms.count + } + + if roomsCount == 0 { + + return Row(filter: .venue(venue.identifier), + name: venue.name, + enabled: scheduleFilter.activeFilters.contains(.venue(venue.identifier))) + } + + let rooms = rooms + .filter { $0.venue == venue.identifier } + .map { Row(filter: .room($0.identifier), name: $0.name, enabled: true ) } + + return GroupRow(filter: .venue(venue.identifier), + name: venue.name, + color: nil, + rows: rooms) + } + + filters.append(Section(category: .venue, type: .mixed(rows))) + } + + if let groupRow = self.groupRow, + groupRow.filter.category == .venue, + let venue = groupRow.filter.identifier, + let roomsSection = scheduleFilter.allFilters[.room] { + + // fetch from CoreData because it caches fetch request results and is more efficient + let identifiers = roomsSection.map { identifier(for: $0) } + + //let scheduledRooms = NSPredicate(format: "id IN %@", identifiers) + let filteredRooms: Predicate = (#keyPath(VenueRoomManagedObject.id)).in(identifiers) + + //let venuePredicate = NSPredicate(format: "ANY venue.id IN %@", [venue]) + let venuePredicate: Predicate = (#keyPath(VenueRoomManagedObject.venue.id)).any(in: [venue]) - let items = venues.map { Item(filter: .venue($0.identifier), name: $0.name, enabled: scheduleFilter.activeFilters.contains(.venue($0.identifier))) } + let predicate: Predicate = .compound(.and([filteredRooms, venuePredicate])) - filters.append(Section(category: .venue, type: .filter(items))) + let rooms = try! context.managedObjects(VenueRoom.self, predicate: predicate, sortDescriptors: VenueRoom.ManagedObject.sortDescriptors) + + let rows = rooms.map { Row(filter: .room($0.identifier), name: $0.name, enabled: scheduleFilter.activeFilters.contains(.room($0.identifier))) } + + filters.append(Section(category: .room, type: .rows(rows))) } } - private func configure(cell: GeneralScheduleFilterTableViewCell, with item: Item) { + private func configure(cell: GeneralScheduleFilterTableViewCell, with item: Row) { cell.nameLabel.text = item.name cell.enabledSwitch.isOn = item.enabled } - private func configure(cell: GeneralScheduleGroupFilterTableViewCell, with groupItem: GroupItem) { - - cell.nameLabel.text = groupItem.name + private func configure(cell: GeneralScheduleGroupFilterTableViewCell, with groupRow: GroupRow) { - let color = UIColor(hexString: groupItem.color) + cell.nameLabel.text = groupRow.name + cell.activeFiltersLabel.text = groupRow.rows.count > 0 ? activeFilters(for: groupRow) : "" - if groupItem.items.count > 0 { + if let circleView = cell.circleView { - cell.circleView.backgroundColor = color - cell.activeFiltersLabel.text = activeFilters(for: groupItem) + circleView.backgroundColor = .clear - } else { - - cell.circleView.layer.borderWidth = 1 - cell.circleView.layer.borderColor = color?.cgColor - cell.circleView.backgroundColor = .clear - cell.activeFiltersLabel.text = "" + if let colorHex = groupRow.color, + let color = UIColor(hexString: colorHex) { + + if groupRow.rows.count > 0 { + + circleView.backgroundColor = color + + } else { + + circleView.layer.borderWidth = 1 + circleView.layer.borderColor = color.cgColor + } + } } } @@ -298,15 +391,16 @@ final class GeneralScheduleFilterViewController: UITableViewController { case .track: title = "TRACKS" case .level: title = "LEVELS" case .venue: title = "VENUES" + case .room: title = "ROOMS" } return title } - private func activeFilters(for group: GroupItem) -> String { + private func activeFilters(for group: GroupRow) -> String { - return group.items.map { $0.name.trimmingCharacters(in: .whitespaces) }.joined(separator: ", ") + return group.rows.map { $0.name.trimmingCharacters(in: .whitespaces) }.joined(separator: ", ") } private func configure(header headerView: TableViewHeaderView, for section: Int) { @@ -329,10 +423,12 @@ final class GeneralScheduleFilterViewController: UITableViewController { switch section.type { - case let .filter(items): return items.count + case .rows(let rows): return rows.count - case let .group(items): return items.count + case .groups(let rows): return rows.count + case .mixed(let rows): return rows.count + } } @@ -342,21 +438,46 @@ final class GeneralScheduleFilterViewController: UITableViewController { switch section.type { - case let .filter(items): + case .rows(let rows): let cell = tableView.dequeueReusableCell(withIdentifier: R.reuseIdentifier.generalScheduleFilterTableViewCell, for: indexPath)! - configure(cell: cell, with: items[indexPath.row]) + configure(cell: cell, with: rows[indexPath.row]) return cell - case let .group(groupItems): + case .groups(let rows): + + let identifier = section.category == .trackGroup ? R.reuseIdentifier.generalScheduleTrackGroupFilterTableViewCell : R.reuseIdentifier.generalScheduleGroupFilterTableViewCell - let cell = tableView.dequeueReusableCell(withIdentifier: R.reuseIdentifier.generalScheduleGroupFilterTableViewCell, for: indexPath)! + let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath)! - configure(cell: cell, with: groupItems[indexPath.row]) + configure(cell: cell, with: rows[indexPath.row]) return cell + + case .mixed(let rows): + + if let row = rows[indexPath.row] as? Row { + + let cell = tableView.dequeueReusableCell(withIdentifier: R.reuseIdentifier.generalScheduleFilterTableViewCell, for: indexPath)! + + configure(cell: cell, with: row) + + return cell + + } else if let row = rows[indexPath.row] as? GroupRow { + + let identifier = section.category == .trackGroup ? R.reuseIdentifier.generalScheduleTrackGroupFilterTableViewCell : R.reuseIdentifier.generalScheduleGroupFilterTableViewCell + + let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath)! + + configure(cell: cell, with: row) + + return cell + } + + return UITableViewCell() } } @@ -377,13 +498,23 @@ final class GeneralScheduleFilterViewController: UITableViewController { switch section.type { - case let .group(groupItems): + case .groups(let rows): + + let groupRow = rows[indexPath.row] + + let generalScheduleFilterViewController = R.storyboard.scheduleFilter.generalScheduleFilterViewController()! + + generalScheduleFilterViewController.groupRow = groupRow + + self.navigationController?.pushViewController(generalScheduleFilterViewController, animated: true) + + case .mixed(let rows): - let groupItem = groupItems[indexPath.row] + guard let groupRow = rows[indexPath.row] as? GroupRow else { return } let generalScheduleFilterViewController = R.storyboard.scheduleFilter.generalScheduleFilterViewController()! - generalScheduleFilterViewController.trackGroupItem = groupItem + generalScheduleFilterViewController.groupRow = groupRow self.navigationController?.pushViewController(generalScheduleFilterViewController, animated: true) @@ -393,14 +524,20 @@ final class GeneralScheduleFilterViewController: UITableViewController { } } +protocol FilterRow { + + var filter: Filter { get } + var name: String { get } +} // MARK: - Supporting Types extension GeneralScheduleFilterViewController { enum SectionType { - case group([GroupItem]) - case filter([Item]) + case rows([Row]) + case groups([GroupRow]) + case mixed([FilterRow]) } struct Section { @@ -409,15 +546,15 @@ extension GeneralScheduleFilterViewController { let type: SectionType } - struct GroupItem { + struct GroupRow: FilterRow { let filter: Filter let name: String - let color: String - let items: [Item] + let color: String? + let rows: [Row] } - struct Item { + struct Row: FilterRow { let filter: Filter let name: String diff --git a/OpenStack Summit/OpenStack Summit/GeneralScheduleViewController.swift b/OpenStack Summit/OpenStack Summit/GeneralScheduleViewController.swift index 96c934f6..6de53d7e 100755 --- a/OpenStack Summit/OpenStack Summit/GeneralScheduleViewController.swift +++ b/OpenStack Summit/OpenStack Summit/GeneralScheduleViewController.swift @@ -177,6 +177,7 @@ final class GeneralScheduleViewController: ScheduleViewController, RevealViewCon let summit = SummitManager.shared.summit.value var tracks = [Identifier]() + var rooms = [Identifier]() var venues = [Identifier]() var levels = [Level]() @@ -184,6 +185,7 @@ final class GeneralScheduleViewController: ScheduleViewController, RevealViewCon switch filter { case let .track(identifier): tracks.append(identifier) + case let .room(identifier): rooms.append(identifier) case let .venue(identifier): venues.append(identifier) case let .level(level): levels.append(level) default: break @@ -192,7 +194,7 @@ final class GeneralScheduleViewController: ScheduleViewController, RevealViewCon let date = DateFilter.interval(start: startDate, end: endDate) - var events = try! EventManagedObject.filter(date, tracks: tracks, levels: levels, venues: venues, summit: summit, context: Store.shared.managedObjectContext) + var events = try! EventManagedObject.filter(date, tracks: tracks, levels: levels, rooms: rooms, venues: venues, summit: summit, context: Store.shared.managedObjectContext) if scheduleFilter.activeFilters.contains(.video) { @@ -223,6 +225,7 @@ final class GeneralScheduleViewController: ScheduleViewController, RevealViewCon let summit = SummitManager.shared.summit.value var tracks = [Identifier]() + var rooms = [Identifier]() var venues = [Identifier]() var levels = [Level]() @@ -230,13 +233,14 @@ final class GeneralScheduleViewController: ScheduleViewController, RevealViewCon switch filter { case let .track(identifier): tracks.append(identifier) + case let .room(identifier): rooms.append(identifier) case let .venue(identifier): venues.append(identifier) case let .level(level): levels.append(level) default: break } } - var events = try! EventManagedObject.filter(filter, tracks: tracks, levels: levels, venues: venues, summit: summit, context: Store.shared.managedObjectContext) + var events = try! EventManagedObject.filter(filter, tracks: tracks, levels: levels, rooms: rooms, venues: venues, summit: summit, context: Store.shared.managedObjectContext) if scheduleFilter.activeFilters.contains(.video) { diff --git a/OpenStack Summit/OpenStack Summit/Info.plist b/OpenStack Summit/OpenStack Summit/Info.plist index 3575254e..1529c3f2 100644 --- a/OpenStack Summit/OpenStack Summit/Info.plist +++ b/OpenStack Summit/OpenStack Summit/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.8 + 3.0.9 CFBundleSignature ???? CFBundleURLTypes diff --git a/OpenStack Summit/OpenStack Summit/LaunchScreenViewController.swift b/OpenStack Summit/OpenStack Summit/LaunchScreenViewController.swift index eccdc12e..d8b66112 100644 --- a/OpenStack Summit/OpenStack Summit/LaunchScreenViewController.swift +++ b/OpenStack Summit/OpenStack Summit/LaunchScreenViewController.swift @@ -478,12 +478,24 @@ private extension LaunchScreenViewController { } else { + + let calendar = Calendar.current + + var startDateFormat = "MMMM dd-" + var endDateFormat = "dd, yyyy" + + if !calendar.isDate(self.end, equalTo: self.start, toGranularity: .month) { + + startDateFormat = "MMMM dd - " + endDateFormat = "MMMM dd, yyyy" + } + let dateFormatter = DateFormatter() dateFormatter.timeZone = self.timeZone - dateFormatter.dateFormat = "MMMM d-" + dateFormatter.dateFormat = startDateFormat let stringDateFrom = dateFormatter.string(from: self.start) - dateFormatter.dateFormat = "d, yyyy" + dateFormatter.dateFormat = endDateFormat let stringDateTo = dateFormatter.string(from: self.end) return stringDateFrom + stringDateTo diff --git a/OpenStack Summit/OpenStack Summit/LevelScheduleViewController.swift b/OpenStack Summit/OpenStack Summit/LevelScheduleViewController.swift index 394726b0..eedd91a7 100755 --- a/OpenStack Summit/OpenStack Summit/LevelScheduleViewController.swift +++ b/OpenStack Summit/OpenStack Summit/LevelScheduleViewController.swift @@ -35,12 +35,14 @@ final class LevelScheduleViewController: ScheduleViewController { let levels = [level!] var tracks = [Identifier]() + var rooms = [Identifier]() var venues = [Identifier]() for filter in scheduleFilter.activeFilters { switch filter { case let .track(identifier): tracks.append(identifier) + case let .room(identifier): venues.append(identifier) case let .venue(identifier): venues.append(identifier) default: break } @@ -48,7 +50,7 @@ final class LevelScheduleViewController: ScheduleViewController { let date = DateFilter.interval(start: startDate, end: endDate) - let events = try! EventManagedObject.filter(date, tracks: tracks, levels: levels, venues: venues, summit: summit, context: Store.shared.managedObjectContext) + let events = try! EventManagedObject.filter(date, tracks: tracks, levels: levels, rooms: rooms, venues: venues, summit: summit, context: Store.shared.managedObjectContext) var activeDates: [Date] = [] @@ -75,18 +77,20 @@ final class LevelScheduleViewController: ScheduleViewController { let levels = [level!] var tracks = [Identifier]() + var rooms = [Identifier]() var venues = [Identifier]() for filter in scheduleFilter.activeFilters { switch filter { case let .track(identifier): tracks.append(identifier) + case let .room(identifier): rooms.append(identifier) case let .venue(identifier): venues.append(identifier) default: break } } - let events = try! EventManagedObject.filter(filter, tracks: tracks, levels: levels, venues: venues, summit: summit, context: Store.shared.managedObjectContext) + let events = try! EventManagedObject.filter(filter, tracks: tracks, levels: levels, rooms: rooms, venues: venues, summit: summit, context: Store.shared.managedObjectContext) return ScheduleItem.from(managedObjects: events) } diff --git a/OpenStack Summit/OpenStack Summit/Menu.storyboard b/OpenStack Summit/OpenStack Summit/Menu.storyboard index 8e6395a1..2135f027 100644 --- a/OpenStack Summit/OpenStack Summit/Menu.storyboard +++ b/OpenStack Summit/OpenStack Summit/Menu.storyboard @@ -1,6 +1,6 @@ - + @@ -26,24 +26,24 @@ - + - - + + - + - + - + @@ -55,7 +55,7 @@ - + @@ -83,10 +83,10 @@ - + - + - - + +