💄 Some changes to improve UX
This commit is contained in:
		| @@ -6,22 +6,19 @@ part of 'call.dart'; | |||||||
| // RiverpodGenerator | // RiverpodGenerator | ||||||
| // ************************************************************************** | // ************************************************************************** | ||||||
|  |  | ||||||
| String _$callNotifierHash() => r'18fb807f067eecd3ea42631c1426c3e5f1fb4280'; | String _$callNotifierHash() => r'eb9bd41b97e9b5e9d54007c8327edb6567458846'; | ||||||
|  |  | ||||||
| /// See also [CallNotifier]. | /// See also [CallNotifier]. | ||||||
| @ProviderFor(CallNotifier) | @ProviderFor(CallNotifier) | ||||||
| final callNotifierProvider = | final callNotifierProvider = NotifierProvider<CallNotifier, CallState>.internal( | ||||||
|     AutoDisposeNotifierProvider<CallNotifier, CallState>.internal( |   CallNotifier.new, | ||||||
|       CallNotifier.new, |   name: r'callNotifierProvider', | ||||||
|       name: r'callNotifierProvider', |   debugGetCreateSourceHash: | ||||||
|       debugGetCreateSourceHash: |       const bool.fromEnvironment('dart.vm.product') ? null : _$callNotifierHash, | ||||||
|           const bool.fromEnvironment('dart.vm.product') |   dependencies: null, | ||||||
|               ? null |   allTransitiveDependencies: null, | ||||||
|               : _$callNotifierHash, | ); | ||||||
|       dependencies: null, |  | ||||||
|       allTransitiveDependencies: null, |  | ||||||
|     ); |  | ||||||
|  |  | ||||||
| typedef _$CallNotifier = AutoDisposeNotifier<CallState>; | typedef _$CallNotifier = Notifier<CallState>; | ||||||
| // ignore_for_file: type=lint | // 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 | // 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 | ||||||
|   | |||||||
| @@ -339,14 +339,16 @@ class _AccountPublisherList extends StatelessWidget { | |||||||
|           for (final publisher in publishers) |           for (final publisher in publishers) | ||||||
|             ListTile( |             ListTile( | ||||||
|               title: Text(publisher.nick), |               title: Text(publisher.nick), | ||||||
|               subtitle: |               subtitle: Text( | ||||||
|                   publisher.bio.isNotEmpty |                 publisher.bio.isNotEmpty | ||||||
|                       ? Text( |                     ? publisher.bio | ||||||
|                         publisher.bio, |                         .split('\n') | ||||||
|                         maxLines: 3, |                         .where((line) => line.trim().isNotEmpty) | ||||||
|                         overflow: TextOverflow.ellipsis, |                         .join('\n') | ||||||
|                       ) |                     : 'descriptionNone'.tr(), | ||||||
|                       : null, |                 maxLines: 3, | ||||||
|  |                 overflow: TextOverflow.ellipsis, | ||||||
|  |               ), | ||||||
|               leading: ProfilePictureWidget( |               leading: ProfilePictureWidget( | ||||||
|                 file: publisher.picture, |                 file: publisher.picture, | ||||||
|                 borderRadius: publisher.type == 1 ? 8 : null, |                 borderRadius: publisher.type == 1 ? 8 : null, | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ import 'package:island/models/post.dart'; | |||||||
| import 'package:island/pods/network.dart'; | import 'package:island/pods/network.dart'; | ||||||
| import 'package:island/pods/userinfo.dart'; | import 'package:island/pods/userinfo.dart'; | ||||||
| import 'package:island/widgets/app_scaffold.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_item.dart'; | ||||||
| import 'package:island/widgets/post/post_quick_reply.dart'; | import 'package:island/widgets/post/post_quick_reply.dart'; | ||||||
| import 'package:island/widgets/post/post_replies.dart'; | import 'package:island/widgets/post/post_replies.dart'; | ||||||
| @@ -66,29 +67,36 @@ class PostDetailScreen extends HookConsumerWidget { | |||||||
|           return Stack( |           return Stack( | ||||||
|             fit: StackFit.expand, |             fit: StackFit.expand, | ||||||
|             children: [ |             children: [ | ||||||
|               CustomScrollView( |               ExtendedRefreshIndicator( | ||||||
|                 slivers: [ |                 onRefresh: () async { | ||||||
|                   SliverToBoxAdapter( |                   ref.invalidate(postProvider(id)); | ||||||
|                     child: Center( |                   ref.invalidate(postRepliesNotifierProvider(id)); | ||||||
|                       child: ConstrainedBox( |                 }, | ||||||
|                         constraints: BoxConstraints(maxWidth: 600), |                 child: CustomScrollView( | ||||||
|                         child: PostItem( |                   physics: const AlwaysScrollableScrollPhysics(), | ||||||
|                           item: post!, |                   slivers: [ | ||||||
|                           isFullPost: true, |                     SliverToBoxAdapter( | ||||||
|                           isEmbedReply: false, |                       child: Center( | ||||||
|                           onUpdate: (newItem) { |                         child: ConstrainedBox( | ||||||
|                             // Update the local state with the new post data |                           constraints: BoxConstraints(maxWidth: 600), | ||||||
|                             ref |                           child: PostItem( | ||||||
|                                 .read(postStateProvider(id).notifier) |                             item: post!, | ||||||
|                                 .updatePost(newItem); |                             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), | ||||||
|                   PostRepliesList(postId: id, maxWidth: 600), |                     SliverGap(MediaQuery.of(context).padding.bottom + 80), | ||||||
|                   SliverGap(MediaQuery.of(context).padding.bottom + 80), |                   ], | ||||||
|                 ], |                 ), | ||||||
|               ), |               ), | ||||||
|               if (user.value != null) |               if (user.value != null) | ||||||
|                 Positioned( |                 Positioned( | ||||||
| @@ -126,7 +134,7 @@ class PostDetailScreen extends HookConsumerWidget { | |||||||
|         error: |         error: | ||||||
|             (e, _) => ResponseErrorWidget( |             (e, _) => ResponseErrorWidget( | ||||||
|               error: e, |               error: e, | ||||||
|               onRetry: () => ref.invalidate(postStateProvider(id)), |               onRetry: () => ref.invalidate(postProvider(id)), | ||||||
|             ), |             ), | ||||||
|       ), |       ), | ||||||
|     ); |     ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user