fix(android): adapt fold layout and diagnostics
This commit is contained in:
@@ -1234,7 +1234,7 @@ class _BetaHomeState extends State<_BetaHome> {
|
||||
final headerActions = [
|
||||
if (_phase == _Phase.connected &&
|
||||
_inChannel &&
|
||||
MediaQuery.of(context).size.width < 840.0) ...[
|
||||
MediaQuery.of(context).size.width < 600.0) ...[
|
||||
IconButton(
|
||||
tooltip: l10n.voiceHardMuteLabel,
|
||||
icon: Icon(_hardMute ? Icons.mic_off : Icons.mic),
|
||||
@@ -1268,7 +1268,7 @@ class _BetaHomeState extends State<_BetaHome> {
|
||||
|
||||
final bodyContent = LayoutBuilder(
|
||||
builder: (ctx, bodyConstraints) {
|
||||
const wideBreakpoint = 840.0;
|
||||
const wideBreakpoint = 600.0;
|
||||
final isWideSnapshot =
|
||||
bodyConstraints.maxWidth >= wideBreakpoint &&
|
||||
_phase == _Phase.connected &&
|
||||
@@ -1390,9 +1390,7 @@ class _BetaHomeState extends State<_BetaHome> {
|
||||
pendingVoiceChannelId: _pendingVoiceChannelId,
|
||||
hasJoinPending: _pendingVoiceChannelId != null,
|
||||
canJoinVoiceChannel: _canJoinVoiceChannel,
|
||||
canLeaveVoiceChannel: _canLeaveVoiceChannel,
|
||||
onJoinChannel: _onJoinChannel,
|
||||
onLeaveVoice: _onLeaveVoice,
|
||||
);
|
||||
const voiceBarWidthWide = 320.0;
|
||||
if (constraints.maxWidth >= wideBreakpoint) {
|
||||
@@ -2047,9 +2045,7 @@ class _SnapshotView extends StatelessWidget {
|
||||
required this.pendingVoiceChannelId,
|
||||
required this.hasJoinPending,
|
||||
required this.canJoinVoiceChannel,
|
||||
required this.canLeaveVoiceChannel,
|
||||
required this.onJoinChannel,
|
||||
required this.onLeaveVoice,
|
||||
});
|
||||
|
||||
final rust.BridgeSnapshot snapshot;
|
||||
@@ -2057,9 +2053,7 @@ class _SnapshotView extends StatelessWidget {
|
||||
final BigInt? pendingVoiceChannelId;
|
||||
final bool hasJoinPending;
|
||||
final bool canJoinVoiceChannel;
|
||||
final bool canLeaveVoiceChannel;
|
||||
final ValueChanged<rust.BridgeChannel> onJoinChannel;
|
||||
final VoidCallback onLeaveVoice;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -2136,27 +2130,22 @@ class _SnapshotView extends StatelessWidget {
|
||||
),
|
||||
title: Text(ch.name),
|
||||
subtitle: Text('id=${ch.id} parent=${ch.parent}'),
|
||||
trailing: IconButton(
|
||||
icon: Icon(
|
||||
ch.id == currentVoiceChannelId
|
||||
? Icons.logout
|
||||
: ch.id == pendingVoiceChannelId
|
||||
? Icons.hourglass_top
|
||||
: Icons.login,
|
||||
),
|
||||
tooltip: ch.id == currentVoiceChannelId
|
||||
? l10n.leaveChannelAction
|
||||
: ch.id == pendingVoiceChannelId
|
||||
? l10n.statusConnecting
|
||||
: l10n.joinChannelAction,
|
||||
onPressed: hasJoinPending
|
||||
? null
|
||||
: ch.id == pendingVoiceChannelId
|
||||
? null
|
||||
: ch.id == currentVoiceChannelId
|
||||
? (canLeaveVoiceChannel ? onLeaveVoice : null)
|
||||
: () => onJoinChannel(ch),
|
||||
),
|
||||
trailing: ch.id == currentVoiceChannelId
|
||||
? null
|
||||
: IconButton(
|
||||
icon: Icon(
|
||||
ch.id == pendingVoiceChannelId
|
||||
? Icons.hourglass_top
|
||||
: Icons.login,
|
||||
),
|
||||
tooltip: ch.id == pendingVoiceChannelId
|
||||
? l10n.statusConnecting
|
||||
: l10n.joinChannelAction,
|
||||
onPressed:
|
||||
hasJoinPending || ch.id == pendingVoiceChannelId
|
||||
? null
|
||||
: () => onJoinChannel(ch),
|
||||
),
|
||||
selected: ch.id == currentVoiceChannelId,
|
||||
onTap:
|
||||
hasJoinPending ||
|
||||
|
||||
Reference in New Issue
Block a user