Skip to content

Commit

Permalink
Merge pull request #756 from OneBusAway/occupancy-status
Browse files Browse the repository at this point in the history
Adds a couple new `occupancyStatus` fields to the enum and app
  • Loading branch information
aaronbrethorst authored Nov 24, 2024
2 parents 9b79182 + ac0d6c2 commit f12ca78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Apps/Shared/app_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ settings:
base:
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: true
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: false
MARKETING_VERSION: 24.3.0
MARKETING_VERSION: 24.3.1

options:
minimumXcodeGenVersion: 2.17
Expand Down
4 changes: 4 additions & 0 deletions OBAKit/Stops/OccupancyStatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ class OccupancyStatusView: UIView {
humanReadable = OBALoc("occupancy_status.crushed_standing_room_only", value: "Crushed standing room only", comment: "Vehicle occupancy is very high")
case .full:
humanReadable = OBALoc("occupancy_status.full", value: "Full", comment: "Vehicle occupancy is full")
case .notBoardable: fallthrough
case .notAcceptingPassengers:
humanReadable = OBALoc("occupancy_status.not_accepting_passengers", value: "Not accepting passengers", comment: "Vehicle is not accepting any passengers")
case .noDataAvailable: fallthrough
case .unknown:
humanReadable = OBALoc("occupancy_status.unknown", value: "Unknown", comment: "Vehicle occupancy status is unknown.")
}
Expand Down Expand Up @@ -104,9 +106,11 @@ class OccupancyStatusView: UIView {
showImageView(at: 0)
showImageView(at: 1)
showImageView(at: 2)
case .notBoardable: fallthrough
case .notAcceptingPassengers:
noPassengersWrapper.isHidden = false
outerStack.insertArrangedSubview(noPassengersWrapper, at: 0)
case .noDataAvailable: fallthrough
case .unknown:
break
}
Expand Down
2 changes: 2 additions & 0 deletions OBAKitCore/Models/REST/ArrivalDeparture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ public class ArrivalDeparture: NSObject, Identifiable, Decodable, HasReferences
case crushedStandingRoomOnly = "CRUSHED_STANDING_ROOM_ONLY"
case full = "FULL"
case notAcceptingPassengers = "NOT_ACCEPTING_PASSENGERS"
case noDataAvailable = "NO_DATA_AVAILABLE"
case notBoardable = "NOT_BOARDABLE"
}

// MARK: - Equality and Hashing
Expand Down

0 comments on commit f12ca78

Please sign in to comment.