💄 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', path: '/account/relationships',
builder: (context, state) => const RelationshipScreen(), builder: (context, state) => const RelationshipScreen(),
), ),
GoRoute(
name: 'accountProfile',
path: '/account/:name',
builder: (context, state) {
final name = state.pathParameters['name']!;
return AccountProfileScreen(name: name);
},
),
GoRoute( GoRoute(
name: 'profileUpdate', name: 'profileUpdate',
path: '/account/me/update', 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) =>
!(p.hasVideo && !(p.hasVideo &&
p.remoteParticipant.trackPublications.values.any( 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: flexWeights:
isWideScreen(context) ? <int>[3, 2, 1] : <int>[4, 1], isWideScreen(context) ? <int>[3, 2, 1] : <int>[4, 1],
consumeMaxWeight: false, consumeMaxWeight: false,
enableSplash: false,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
children: [ children: [
for (final item in items) for (final item in items)
switch (type) { 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:
(error, stackTrace) => AppScaffold( (error, stackTrace) => AppScaffold(
noBackground: false,
appBar: AppBar(leading: const PageBackButton()), appBar: AppBar(leading: const PageBackButton()),
body: Center(child: Text(error.toString())), body: Center(child: Text(error.toString())),
), ),
loading: loading:
() => AppScaffold( () => AppScaffold(
noBackground: false,
appBar: AppBar(leading: const PageBackButton()), appBar: AppBar(leading: const PageBackButton()),
body: Center(child: CircularProgressIndicator()), body: Center(child: CircularProgressIndicator()),
), ),

View File

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