Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a couple new occupancyStatus fields to the enum and app #756

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading