jesusrp98 / spacex-go

Simple yet powerful, open-source SpaceX launch tracker.
https://play.google.com/store/apps/details?id=com.chechu.cherry
GNU General Public License v3.0
877 stars 252 forks source link

Payload capsule could be null. Use null-aware operator to access its properties #140

Closed giohappy closed 3 years ago

giohappy commented 3 years ago

Environment

App version: master Android version: API29
Device information: Emulator

Description

The home tab crashes if payload.capsule is null here.

Adding a null-aware access to the payload's capsule property fix the problem:

payload.capsule?.serial == null

Images

Without null-aware access: image

With null-aware access: image

jesusrp98 commented 3 years ago

Hey! Thank you very much for opening an issue related to this problem. Unfortunately I've had zero time for this project lately :/

Could you please open a PR containing the fixes for this issue? I'd more than happily merge them to master :)