[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(profile): end-of-network logic

+11 -17
+2 -2
lib/src/core/design_system/components/organisms/bottom_nav_bar.dart
··· 144 144 onTap: onTap, 145 145 child: AnimatedContainer( 146 146 duration: AppConstants.animationFast, 147 - padding: const EdgeInsets.all(5), 147 + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5), 148 148 child: builder(context, isSelected), 149 149 ), 150 150 ); ··· 176 176 onTap: onTap, 177 177 child: AnimatedContainer( 178 178 duration: AppConstants.animationFast, 179 - padding: const EdgeInsets.all(5), 179 + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5), 180 180 child: Stack( 181 181 clipBehavior: Clip.none, 182 182 children: [
+3 -5
lib/src/features/profile/providers/profile_feed_provider.dart
··· 95 95 96 96 // End of network when: 97 97 // 1. API returns null cursor (no more pages) 98 - // 2. API returns fewer posts than requested (last page) 99 - // 3. No new posts were added (duplicates or empty response) 98 + // 2. API returned posts but all were duplicates (prevents infinite loops) 99 + // Note: Don't check posts.isEmpty - empty page with cursor means more exist 100 100 final isEndOfNetwork = 101 101 result.cursor == null || 102 - result.posts.length < ProfileFeedState.fetchLimit || 103 - (currentState != null && 104 - currentState.allPosts.length == allPosts.length); 102 + (result.posts.isNotEmpty && newPosts.isEmpty); 105 103 106 104 return ProfileFeedState( 107 105 loadedPosts: allPosts,
+3 -5
lib/src/features/profile/providers/profile_likes_provider.dart
··· 89 89 90 90 // End of network when: 91 91 // 1. API returns null cursor (no more pages) 92 - // 2. API returns fewer posts than requested (last page) 93 - // 3. No new posts were added (duplicates or empty response) 92 + // 2. API returned posts but all were duplicates (prevents infinite loops) 93 + // Note: Don't check posts.isEmpty - empty page with cursor means more exist 94 94 final isEndOfNetwork = 95 95 result.cursor == null || 96 - result.posts.length < ProfileFeedState.fetchLimit || 97 - (currentState != null && 98 - currentState.allPosts.length == allPosts.length); 96 + (result.posts.isNotEmpty && newPosts.isEmpty); 99 97 100 98 return ProfileFeedState( 101 99 loadedPosts: allPosts,
+3 -5
lib/src/features/profile/providers/profile_reposts_provider.dart
··· 89 89 90 90 // End of network when: 91 91 // 1. API returns null cursor (no more pages) 92 - // 2. API returns fewer posts than requested (last page) 93 - // 3. No new posts were added (duplicates or empty response) 92 + // 2. API returned posts but all were duplicates (prevents infinite loops) 93 + // Note: Don't check posts.isEmpty - empty page with cursor means more exist 94 94 final isEndOfNetwork = 95 95 result.cursor == null || 96 - result.posts.length < ProfileFeedState.fetchLimit || 97 - (currentState != null && 98 - currentState.allPosts.length == allPosts.length); 96 + (result.posts.isNotEmpty && newPosts.isEmpty); 99 97 100 98 return ProfileFeedState( 101 99 loadedPosts: allPosts,