NY-9852: [AN]: Ensure message from message list is not null
Created by: rvc-brickabode
From our internal process review:
- This method should be private. It is being only used locally by getNextPositionByMessage method.
- Avoid the NullPointerException by checking if MessageModel is not NULL.
Observing Crashlitcs we only had one issue in 0.19.2 (341) build version. On that time we did not have both checking. That's why we had the crash. However, it impacted only 1 user in our base and the improvement fixes the issue.
That method is used to define a divider of read and unread message in the messages list. For that, we need to know the last message by serverId. The app might crash if messages are deleted from the list while the messages list screen is being created.