fix profile pinned posts duplication
we really need a better system for aborting requests via state changes; for non-pinned posts and notifications, it's possible to screw up state by navigating in a particular way, causing fetched feeds to loop for seemingly no reason.
This commit is contained in:
		
							parent
							
								
									22d6c5b90a
								
							
						
					
					
						commit
						a5a066be3d
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		|  | @ -89,13 +89,11 @@ | |||
|             token, | ||||
|             profile.id, | ||||
|         ).then(async posts => { | ||||
|             const parsed_posts = []; | ||||
|             for (let post of posts) { | ||||
|                 const parsedPost = await parsePost(post, 1); | ||||
|                 profile_pinned_posts.update(posts => { | ||||
|                     posts.push(parsedPost); | ||||
|                     return posts; | ||||
|                 }); | ||||
|                 parsed_posts.push(await parsePost(post, 1)); | ||||
|             } | ||||
|             profile_pinned_posts.set(parsed_posts); | ||||
|         }); | ||||
| 
 | ||||
|         let post_lock = false; // `true` == "locked" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue