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( return Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
appBar: AppBar( appBar: AppBar(
backgroundColor: Theme.of(context).appBarTheme.color.withOpacity(0.9), backgroundColor: Theme.of(context).appBarTheme.color.withOpacity(0.95),
leading: selectMode leading: selectMode
? IconButton( ? IconButton(
icon: Icon(Icons.close), icon: Icon(Icons.close),

View File

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

View File

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