Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ object UPSDeliveryService : DeliveryService {
else -> logUnknownStatus("UPS", details.progressBarType!!)
}

val metadata =
mutableMapOf(
R.string.property_weight to
"${details.additionalInformation!!.weight} ${details.additionalInformation.weightUnit}",
)
val metadata = mutableMapOf<Int, String>()
if (details.additionalInformation?.weightUnit != null) {
metadata[R.string.property_weight] =
"${details.additionalInformation.weight} ${details.additionalInformation.weightUnit}"
}

// ETA
if (details.scheduledDeliveryDateDetail != null && details.packageStatusTime != null) {
Expand Down Expand Up @@ -188,7 +188,7 @@ object UPSDeliveryService : DeliveryService {
@JsonClass(generateAdapter = true)
internal data class PkgMoreInfo(
val weight: String,
val weightUnit: String,
val weightUnit: String?,
)

@JsonClass(generateAdapter = true)
Expand Down