[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.

fmt

+24 -15
+6 -5
lib/src/core/network/atproto/data/adapters/bsky/repo_adapter.dart
··· 1 1 import 'package:atproto_core/atproto_core.dart'; 2 2 3 3 /// Callback type for deleting a record 4 - typedef DeleteRecordCallback = Future<void> Function({ 5 - required String repo, 6 - required String collection, 7 - required String rkey, 8 - }); 4 + typedef DeleteRecordCallback = 5 + Future<void> Function({ 6 + required String repo, 7 + required String collection, 8 + required String rkey, 9 + }); 9 10 10 11 /// Adapter for Bluesky repository operations 11 12 ///
+18 -10
lib/src/features/comments/providers/comments_page_provider.dart
··· 21 21 try { 22 22 final thread = await feedRepository 23 23 .getThread(postUri, bluesky: isBlueskyPost, depth: 1) 24 - .timeout(timeoutDuration, onTimeout: () { 25 - throw Exception('Request timed out while loading thread for $postUri'); 26 - }); 24 + .timeout( 25 + timeoutDuration, 26 + onTimeout: () { 27 + throw Exception('Request timed out while loading thread for $postUri'); 28 + }, 29 + ); 27 30 switch (thread) { 28 31 case ThreadViewPost(): 29 32 return CommentsPageState(thread: thread); ··· 37 40 try { 38 41 final networkPost = await feedRepository 39 42 .getPosts([postUri], bluesky: isBlueskyPost, filter: false) 40 - .timeout(timeoutDuration, onTimeout: () { 41 - throw Exception('Request timed out while verifying post exists'); 42 - }); 43 + .timeout( 44 + timeoutDuration, 45 + onTimeout: () { 46 + throw Exception('Request timed out while verifying post exists'); 47 + }, 48 + ); 43 49 if (networkPost.isEmpty) { 44 50 throw Exception('No posts found at $postUri'); 45 51 } ··· 47 53 // Retry getThread once after confirming post exists 48 54 final thread = await feedRepository 49 55 .getThread(postUri, bluesky: isBlueskyPost, depth: 1) 50 - .timeout(timeoutDuration, onTimeout: () { 51 - throw Exception('Request timed out while retrying thread load for $postUri'); 52 - }); 56 + .timeout( 57 + timeoutDuration, 58 + onTimeout: () { 59 + throw Exception('Request timed out while retrying thread load for $postUri'); 60 + }, 61 + ); 53 62 switch (thread) { 54 63 case ThreadViewPost(): 55 64 return CommentsPageState(thread: thread); ··· 74 83 List<XFile>? imageFiles, 75 84 Map<String, String>? altTexts, 76 85 }) async { 77 - 78 86 // We need the current state to determine if the post is a sprk or bsky post. 79 87 // If the state is not loaded, we cannot proceed. 80 88 final currentState = state.value;