Fix portrait bar initial load #4110
Ticket(s) / Related Merge Requests
Summary of Changes
The issue was caused by the new prepend functionality of the FeedList component, it was unmounting/mounting the prepended component every time the first item of the list changed. Because the Newsfeed first shows the cached posts while loading the new ones the first item usually changes once when the app starts, mounting the PortraitBar and loading the content twice simultaneously.
I changed the implementation of the prepend option of the FeedList to always render with the same key no matter the data of the list.
Testing Considerations
- Open the app
- Log in (with an existent user)
- The portrait bar should load correctly the first time (showing portrait content if available
Regression Scope
This change only affects FeedLists with prepended components. But the possibility of any regression is low.
Platform Affected (web, mobile, etc)
iOS, Android
Developer Testing Completed
Tested with a clean installation of the app, and restarting it with cached information.
Edited by Martin Santangelo