Commit 0d1c541
committed
Fix: InfiniteContainer refresh race condition
Added a guard clause to `refreshImpl` in `InfiniteContainer` to prevent re-entrant calls when a refresh is already in progress. This fixes an issue where rapid pull-to-refresh actions could cause the container's content (specifically when containing a single item) to disappear temporarily due to race conditions during the removal and addition of components.
Also wrapped the user-defined `fetchComponents` call in a try-catch block to ensure the `requestingResults` flag is correctly reset even if an exception occurs, preventing the container from becoming stuck in a loading state.1 parent 7af2bce commit 0d1c541
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
127 | 130 | | |
128 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| |||
0 commit comments