💄 Optimization

This commit is contained in:
2025-08-01 18:03:54 +08:00
parent 28335dd548
commit 84b1d6a346
5 changed files with 23 additions and 12 deletions

View File

@@ -433,14 +433,6 @@ final routerProvider = Provider<GoRouter>((ref) {
path: '/account/relationships',
builder: (context, state) => const RelationshipScreen(),
),
GoRoute(
name: 'accountProfile',
path: '/account/:name',
builder: (context, state) {
final name = state.pathParameters['name']!;
return AccountProfileScreen(name: name);
},
),
GoRoute(
name: 'profileUpdate',
path: '/account/me/update',
@@ -463,6 +455,15 @@ final routerProvider = Provider<GoRouter>((ref) {
),
],
),
GoRoute(
name: 'accountProfile',
path: '/account/:name',
builder: (context, state) {
final name = state.pathParameters['name']!;
return AccountProfileScreen(name: name);
},
),
],
),
],

View File

@@ -31,7 +31,11 @@ class CallScreen extends HookConsumerWidget {
(p) =>
!(p.hasVideo &&
p.remoteParticipant.trackPublications.values.any(
(pub) => pub.track != null && pub.kind == TrackType.VIDEO,
(pub) =>
pub.track != null &&
pub.kind == TrackType.VIDEO &&
!pub.muted &&
!pub.isDisposed,
)),
);

View File

@@ -344,6 +344,10 @@ class _DiscoveryActivityItem extends StatelessWidget {
flexWeights:
isWideScreen(context) ? <int>[3, 2, 1] : <int>[4, 1],
consumeMaxWeight: false,
enableSplash: false,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
children: [
for (final item in items)
switch (type) {
@@ -364,7 +368,7 @@ class _DiscoveryActivityItem extends StatelessWidget {
],
),
),
).padding(bottom: 8),
).padding(bottom: 8, horizontal: 8),
],
),
);

View File

@@ -389,11 +389,13 @@ class PublisherProfileScreen extends HookConsumerWidget {
),
error:
(error, stackTrace) => AppScaffold(
noBackground: false,
appBar: AppBar(leading: const PageBackButton()),
body: Center(child: Text(error.toString())),
),
loading:
() => AppScaffold(
noBackground: false,
appBar: AppBar(leading: const PageBackButton()),
body: Center(child: CircularProgressIndicator()),
),

View File

@@ -76,7 +76,7 @@ class CallControlsBar extends HookConsumerWidget {
title: Text('callLeave').tr(),
onTap: () {
callNotifier.disconnect();
Navigator.of(context).pop();
GoRouter.of(context).pop();
},
),
ListTile(
@@ -91,7 +91,7 @@ class CallControlsBar extends HookConsumerWidget {
);
callNotifier.dispose();
if (context.mounted) {
Navigator.of(context).pop();
GoRouter.of(context).pop();
}
},
),