Skip to content

Conversation

@marcaaron
Copy link
Contributor

When we implemented FlatList we included logic that told the FlatList to only re-render if the size of the list changes.

That change is undone here and I'm also removing some PureComponent / shouldComponentUpdate stuff further downstream of the FlatList since I don't think we actually need it (but we might want to add it back eventually). My main reasoning is that FlatList is a windowing API and is pretty efficient already. This stuff helped more when we were using a ScrollView, but I think it just makes things harder to reason about. And removing it doesn't seem to impact performance at all (I think probably because the way FlatList works it to render things as needed anyway).

Tests:

  1. Add an attachment
  2. Verify the image appears in the chat after some time

@marcaaron marcaaron self-assigned this Sep 26, 2020
Copy link
Contributor

@AndrewGable AndrewGable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@AndrewGable AndrewGable merged commit b7cd761 into master Sep 28, 2020
@AndrewGable AndrewGable deleted the marcaaron-attachmentLoaderBorked branch September 28, 2020 18:47
kidroca added a commit to kidroca/Expensify.cash that referenced this pull request Feb 19, 2022
Regarding the breaking change - we're not using SSID information - it doesn't affect us

v8 Includes the following fixes:
8.0.0 (2022-02-10)

BREAKING CHANGES
it's possible this is a breaking change, depending on your app use case. If you relied on iOS SSID information and met Apple's strict criteria for accessing SSID, you need to set the new config value shouldFetchWiFiSSID to true. If you set it to true and do not meet the criteria your app may crash due to a memory leak. All versions prior to 7.1.12 would attempt to fetch the information regardless of permission, leak memory, and possibly crash. This change avoids that crash.

Bug Fixes
ios: avoid memory leak from ssid APIs by adding explicit config (Expensify#560) (fbf7c15), closes Expensify#420

7.1.11 (2022-02-08)
Bug Fixes
windows: fix race condition in WiFi connection details feature (Expensify#568) (0cd8132)

7.1.10 (2022-02-07)
Bug Fixes
android: use registerDefaultNetworkCallback so toggling airplane mode works (Expensify#571) (e8af2de)

7.1.9 (2022-01-26)
Bug Fixes
android: count native listeners / correctly disable listener if count == 0 (Expensify#569) (5ae16f6)

7.1.8 (2022-01-25)
Bug Fixes
windows: refactor implementation to avoid crashes (Expensify#564) (cc4bfa3)

7.1.7 (2021-12-20)
Bug Fixes
android: populate network value during initial module startup (Expensify#553) (c05080f)

7.1.6 (2021-12-13)
Bug Fixes
android: avoid send event when has no listener (Expensify#548) (cad47d8)

7.1.5 (2021-12-09)
Bug Fixes
android: use method-local ref to instance var for multi-thread safety Expensify#549 (Expensify#550) (81bbc87)

7.1.4 (2021-12-07)
Bug Fixes
android: try async state fetch as stale state workaround (Expensify#547) (937cf48), closes Expensify#542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants