💄 Some changes to improve UX
This commit is contained in:
@@ -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<CallNotifier, CallState>.internal(
|
||||
CallNotifier.new,
|
||||
name: r'callNotifierProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$callNotifierHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
final callNotifierProvider = NotifierProvider<CallNotifier, CallState>.internal(
|
||||
CallNotifier.new,
|
||||
name: r'callNotifierProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$callNotifierHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$CallNotifier = AutoDisposeNotifier<CallState>;
|
||||
typedef _$CallNotifier = Notifier<CallState>;
|
||||
// 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
|
||||
|
@@ -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,
|
||||
|
@@ -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)),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user