💄 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

@@ -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()),
),