Clean up design

This commit is contained in:
Christian Pauly 2020-06-20 11:35:54 +02:00
parent c0429c1e93
commit 90e92e7982
5 changed files with 14 additions and 12 deletions

View File

@ -347,7 +347,7 @@ class _ChatState extends State<_Chat> {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
backgroundColor: Theme.of(context).appBarTheme.color.withOpacity(0.9),
backgroundColor: Theme.of(context).appBarTheme.color.withOpacity(0.95),
leading: selectMode
? IconButton(
icon: Icon(Icons.close),

View File

@ -437,14 +437,16 @@ class _ChatListState extends State<ChatList> {
rooms.length + publicRoomsCount;
final directChats =
rooms.where((r) => r.isDirectChat).toList();
directChats.sort((a, b) => Matrix.of(context)
.client
.presences[b.directChatMatrixID]
?.presence
?.statusMsg !=
null
? 1
: -1);
final presences =
Matrix.of(context).client.presences;
directChats.sort((a, b) =>
presences[b.directChatMatrixID]
?.presence
?.statusMsg !=
null
? 1
: a.lastEvent.originServerTs.compareTo(
b.lastEvent.originServerTs));
return ListView.separated(
controller: _scrollController,
separatorBuilder:

View File

@ -184,7 +184,7 @@ class _LoginState extends State<Login> {
L10n.of(context).login.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => loading ? null : login(context),
onPressed: loading ? null : () => login(context),
),
),
),

View File

@ -155,7 +155,7 @@ class _SignUpState extends State<SignUp> {
L10n.of(context).signUp.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => loading ? null : signUpAction(context),
onPressed: loading ? null : () => signUpAction(context),
),
),
),

View File

@ -168,7 +168,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
L10n.of(context).createAccountNow.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 16),
),
onPressed: () => loading ? null : _signUpAction(context),
onPressed: loading ? null : () => _signUpAction(context),
),
),
),