diff --git a/lib/pods/call.g.dart b/lib/pods/call.g.dart index d7901c1e..d55185cb 100644 --- a/lib/pods/call.g.dart +++ b/lib/pods/call.g.dart @@ -6,22 +6,19 @@ part of 'call.dart'; // RiverpodGenerator // ************************************************************************** -String _$callNotifierHash() => r'18fb807f067eecd3ea42631c1426c3e5f1fb4280'; +String _$callNotifierHash() => r'eb9bd41b97e9b5e9d54007c8327edb6567458846'; /// See also [CallNotifier]. @ProviderFor(CallNotifier) -final callNotifierProvider = - AutoDisposeNotifierProvider.internal( - CallNotifier.new, - name: r'callNotifierProvider', - debugGetCreateSourceHash: - const bool.fromEnvironment('dart.vm.product') - ? null - : _$callNotifierHash, - dependencies: null, - allTransitiveDependencies: null, - ); +final callNotifierProvider = NotifierProvider.internal( + CallNotifier.new, + name: r'callNotifierProvider', + debugGetCreateSourceHash: + const bool.fromEnvironment('dart.vm.product') ? null : _$callNotifierHash, + dependencies: null, + allTransitiveDependencies: null, +); -typedef _$CallNotifier = AutoDisposeNotifier; +typedef _$CallNotifier = Notifier; // ignore_for_file: type=lint // ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package diff --git a/lib/screens/account/profile.dart b/lib/screens/account/profile.dart index a67032fc..4b110df1 100644 --- a/lib/screens/account/profile.dart +++ b/lib/screens/account/profile.dart @@ -339,14 +339,16 @@ class _AccountPublisherList extends StatelessWidget { for (final publisher in publishers) ListTile( title: Text(publisher.nick), - subtitle: - publisher.bio.isNotEmpty - ? Text( - publisher.bio, - maxLines: 3, - overflow: TextOverflow.ellipsis, - ) - : null, + subtitle: Text( + publisher.bio.isNotEmpty + ? publisher.bio + .split('\n') + .where((line) => line.trim().isNotEmpty) + .join('\n') + : 'descriptionNone'.tr(), + maxLines: 3, + overflow: TextOverflow.ellipsis, + ), leading: ProfilePictureWidget( file: publisher.picture, borderRadius: publisher.type == 1 ? 8 : null, diff --git a/lib/screens/posts/post_detail.dart b/lib/screens/posts/post_detail.dart index d963e1d0..95b1a199 100644 --- a/lib/screens/posts/post_detail.dart +++ b/lib/screens/posts/post_detail.dart @@ -6,6 +6,7 @@ import 'package:island/models/post.dart'; import 'package:island/pods/network.dart'; import 'package:island/pods/userinfo.dart'; import 'package:island/widgets/app_scaffold.dart'; +import 'package:island/widgets/extended_refresh_indicator.dart'; import 'package:island/widgets/post/post_item.dart'; import 'package:island/widgets/post/post_quick_reply.dart'; import 'package:island/widgets/post/post_replies.dart'; @@ -66,29 +67,36 @@ class PostDetailScreen extends HookConsumerWidget { return Stack( fit: StackFit.expand, children: [ - CustomScrollView( - slivers: [ - SliverToBoxAdapter( - child: Center( - child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 600), - child: PostItem( - item: post!, - isFullPost: true, - isEmbedReply: false, - onUpdate: (newItem) { - // Update the local state with the new post data - ref - .read(postStateProvider(id).notifier) - .updatePost(newItem); - }, + ExtendedRefreshIndicator( + onRefresh: () async { + ref.invalidate(postProvider(id)); + ref.invalidate(postRepliesNotifierProvider(id)); + }, + child: CustomScrollView( + physics: const AlwaysScrollableScrollPhysics(), + slivers: [ + SliverToBoxAdapter( + child: Center( + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 600), + child: PostItem( + item: post!, + isFullPost: true, + isEmbedReply: false, + onUpdate: (newItem) { + // Update the local state with the new post data + ref + .read(postStateProvider(id).notifier) + .updatePost(newItem); + }, + ), ), ), ), - ), - PostRepliesList(postId: id, maxWidth: 600), - SliverGap(MediaQuery.of(context).padding.bottom + 80), - ], + PostRepliesList(postId: id, maxWidth: 600), + SliverGap(MediaQuery.of(context).padding.bottom + 80), + ], + ), ), if (user.value != null) Positioned( @@ -126,7 +134,7 @@ class PostDetailScreen extends HookConsumerWidget { error: (e, _) => ResponseErrorWidget( error: e, - onRetry: () => ref.invalidate(postStateProvider(id)), + onRetry: () => ref.invalidate(postProvider(id)), ), ), );