Skip to content

Commit 6cff26e

Browse files
authored
Release v3.0.2 (#114)
* [iOS] [13314] Fixes venue map zoom defaults. * Restores OAuth2 access revoked notification handling. Updates aerogear-ios-oauth2 lib. * [iOS] [13370] Splash fallbacks to loaded summit name and date display. * [iOS] [13431] Updates NOW button logic. * Version bump to 3.0.2.
1 parent a6fd378 commit 6cff26e

9 files changed

Lines changed: 78 additions & 10 deletions

File tree

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ github "OpenStack-Mobile/XCDYouTubeKit" "2.5.3"
1414
github "xmartlabs/XLPagerTabStrip" "7.0.0"
1515
github "OpenStack-Mobile/AFHorizontalDayPicker" "74c3521f935039b2b6e945380ecd06752076ec8a"
1616
github "OpenStack-Mobile/aerogear-ios-http" "60ed79d74e53127efef9ba49fe5d777f40bf2719"
17-
github "OpenStack-Mobile/aerogear-ios-oauth2" "4bea335d4a9720d0f051eb59ff455a32bb87bb74"
17+
github "OpenStack-Mobile/aerogear-ios-oauth2" "b8c84cf4110d8e2dd2e86d907819ba15005e8502"

OpenStack Summit/CoreSummit/Store.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@ public final class Store {
102102
// config OAuth and HTTP
103103
configOAuthAccounts()
104104

105-
/* Removed from lib
106105
NotificationCenter.default.removeObserver(self, name: OAuth2Module.revokeNotification, object: nil)
107106
NotificationCenter.default.addObserver(
108107
self,
109108
selector: #selector(revokedAccess),
110109
name: OAuth2Module.revokeNotification,
111110
object: nil)
112-
*/
113111
}
114112

115113
// MARK: - Accessors

OpenStack Summit/OpenStack Summit/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>3.0.1</string>
20+
<string>3.0.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>

OpenStack Summit/OpenStack Summit/LaunchScreenViewController.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,27 @@ final class LaunchScreenViewController: UIViewController, MessageEnabledViewCont
149149
dateFormatter.dateFormat = "d, yyyy"
150150
let stringDateTo = dateFormatter.string(from: summit.end)
151151

152+
self.summitDateLabel.text = stringDateFrom + stringDateTo
153+
}
154+
155+
} else if let currentSummit = currentSummit {
156+
157+
self.summitNameLabel.text = currentSummit.name.uppercased()
158+
159+
if let datesLabel = currentSummit.datesLabel {
160+
161+
self.summitDateLabel.text = datesLabel
162+
}
163+
else {
164+
165+
let dateFormatter = DateFormatter()
166+
dateFormatter.timeZone = TimeZone(identifier: currentSummit.timeZone)
167+
dateFormatter.dateFormat = "MMMM d-"
168+
let stringDateFrom = dateFormatter.string(from: currentSummit.start)
169+
170+
dateFormatter.dateFormat = "d, yyyy"
171+
let stringDateTo = dateFormatter.string(from: currentSummit.end)
172+
152173
self.summitDateLabel.text = stringDateFrom + stringDateTo
153174
}
154175
}

OpenStack Summit/OpenStack Summit/MenuViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,12 @@ final class MenuViewController: UIViewController, UITextFieldDelegate, ActivityV
109109
revealViewController().view.addGestureRecognizer(revealViewController().panGestureRecognizer())
110110

111111
// session notifications
112-
/*
113112
NotificationCenter.default.removeObserver(self, name: OAuth2Module.revokeNotification, object: nil)
114113
NotificationCenter.default.addObserver(
115114
self,
116115
selector: #selector(MenuViewController.revokedAccess(_:)),
117116
name: OAuth2Module.revokeNotification,
118117
object: nil)
119-
*/
120118

121119
// observe unread notifications
122120
unreadTeamMessagesObserver = PushNotificationManager.shared.unreadTeamMessages

OpenStack Summit/OpenStack Summit/ScheduleViewController.swift

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,56 @@ class ScheduleViewController: UIViewController, EventViewController, MessageEnab
411411
private func nowEventIndex() -> Int? {
412412

413413
let now = Date()
414+
var candidatePos: Int? = nil
415+
var candidateEndDate: Date? = nil
416+
var candidateAlreadyStarted = false
417+
var candidatePosFallback: Int? = nil
414418

415-
return self.dayEvents.index(where: { $0.end >= now && $0.track != "General" })
419+
for (index, event) in self.dayEvents.enumerated() {
420+
421+
let endDate = event.end as NSDate
422+
423+
if endDate.mt_is(after: now) || endDate.isEqual(to: now) && event.eventType == "Presentation" {
424+
425+
let startDate = event.start as NSDate
426+
let oneHourAgo = (now as NSDate).mt_oneHourPrevious()
427+
428+
// already started
429+
let currentAlreadyStarted = startDate.mt_is(before: now) || startDate.mt_is(before: now)
430+
// started over more than hour ago
431+
if currentAlreadyStarted && startDate.mt_is(before: oneHourAgo) {
432+
433+
candidatePosFallback = index
434+
continue
435+
}
436+
437+
if candidateAlreadyStarted && !currentAlreadyStarted {
438+
439+
continue
440+
}
441+
442+
if candidateEndDate == nil || (candidateEndDate! as NSDate).mt_is(after: event.end) {
443+
444+
candidatePos = index
445+
candidateAlreadyStarted = currentAlreadyStarted
446+
candidateEndDate = event.end
447+
}
448+
}
449+
}
450+
451+
if candidatePos == nil {
452+
453+
candidatePos = candidatePosFallback
454+
}
455+
456+
if candidatePos == nil {
457+
458+
return self.dayEvents.count - 1
459+
}
460+
else {
461+
462+
return candidatePos
463+
}
416464
}
417465

418466
// MARK: - AFHorizontalDayPickerDelegate

OpenStack Summit/OpenStack Summit/VenuesMapViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ final class VenuesMapViewController: UIViewController, GMSMapViewDelegate, Indic
1717
// MARK: - Properties
1818

1919
var mapView: GMSMapView!
20+
2021
private(set) var dictionary = [GMSMarker: Identifier]()
2122

2223
// MARK: - Loading
@@ -68,9 +69,11 @@ final class VenuesMapViewController: UIViewController, GMSMapViewDelegate, Indic
6869
dictionary[marker] = venue.identifier
6970
}
7071

72+
let zoom: Float = venues.count == 1 ? 7 : 2
73+
7174
let update = GMSCameraUpdate.fit(bounds)
7275
mapView.moveCamera(update)
73-
mapView.animate(toZoom: mapView.camera.zoom - 1)
76+
mapView.animate(toZoom: mapView.camera.zoom - zoom)
7477
}
7578

7679
// MARK: - GMSMapViewDelegate

OpenStack Summit/OpenStackSummitWatch Extension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>3.0.1</string>
20+
<string>3.0.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

OpenStack Summit/OpenStackSummitWatch/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>3.0.1</string>
20+
<string>3.0.2</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

0 commit comments

Comments
 (0)