Minor fixes
This commit is contained in:
parent
c23c8ac957
commit
1cdbfc4f0b
|
@ -4,9 +4,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
extension PresenceExtension on Presence {
|
||||
bool get isStatus =>
|
||||
(statusMsg?.isNotEmpty ?? false) ||
|
||||
this.displayname != null ||
|
||||
this.avatarUrl != null;
|
||||
(statusMsg?.isNotEmpty ?? false) || this.displayname != null;
|
||||
|
||||
String getLocalizedStatusMessage(BuildContext context) {
|
||||
if (!isStatus) return null;
|
||||
|
|
|
@ -229,7 +229,9 @@ class _ChatListState extends State<ChatList> {
|
|||
setState(() => selectMode = SelectMode.normal);
|
||||
}
|
||||
return Scaffold(
|
||||
drawer: Drawer(
|
||||
drawer: selectMode == SelectMode.share
|
||||
? null
|
||||
: Drawer(
|
||||
child: SafeArea(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
|
@ -281,9 +283,17 @@ class _ChatListState extends State<ChatList> {
|
|||
),
|
||||
),
|
||||
appBar: AppBar(
|
||||
leading: selectMode != SelectMode.share
|
||||
? null
|
||||
: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Matrix.of(context).shareContent = null,
|
||||
),
|
||||
elevation: Matrix.of(context).client.statusList.isEmpty ? null : 0,
|
||||
titleSpacing: 0,
|
||||
title: Container(
|
||||
title: selectMode == SelectMode.share
|
||||
? Text(I18n.of(context).share)
|
||||
: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
height: 42,
|
||||
margin: EdgeInsets.only(right: 8),
|
||||
|
@ -327,8 +337,8 @@ class _ChatListState extends State<ChatList> {
|
|||
),
|
||||
),
|
||||
),
|
||||
floatingActionButton: AdaptivePageLayout.columnMode(context) &&
|
||||
selectMode == SelectMode.share
|
||||
floatingActionButton: (AdaptivePageLayout.columnMode(context) ||
|
||||
selectMode == SelectMode.share)
|
||||
? null
|
||||
: SpeedDial(
|
||||
child: Icon(Icons.add),
|
||||
|
|
Loading…
Reference in a new issue