fix: More minor fixes

This commit is contained in:
Christian Pauly 2021-02-05 16:43:05 +01:00
parent 89d0a85716
commit 4c10ef5213
3 changed files with 23 additions and 15 deletions

View File

@ -16,9 +16,6 @@ class ContactListTile extends StatelessWidget {
var statusMsg = contact.presence?.statusMsg?.isNotEmpty ?? false var statusMsg = contact.presence?.statusMsg?.isNotEmpty ?? false
? contact.presence.statusMsg ? contact.presence.statusMsg
: null; : null;
if (contact.senderId == '@jana:janian.de') {
statusMsg = 'Hallo Welt';
}
return FutureBuilder<Profile>( return FutureBuilder<Profile>(
future: future:
Matrix.of(context).client.getProfileFromUserId(contact.senderId), Matrix.of(context).client.getProfileFromUserId(contact.senderId),

View File

@ -26,6 +26,8 @@ extension ClientPresenceExtension on Client {
(p.presence?.statusMsg?.isNotEmpty ?? false)) (p.presence?.statusMsg?.isNotEmpty ?? false))
.toList(), .toList(),
); );
contactList.sort((a, b) => a.senderId.compareTo(b.senderId));
contactList.sort((a, b) => (a.presence.lastActiveAgo?.toDouble() ?? contactList.sort((a, b) => (a.presence.lastActiveAgo?.toDouble() ??
double.infinity) double.infinity)
.compareTo((b.presence.lastActiveAgo?.toDouble() ?? double.infinity))); .compareTo((b.presence.lastActiveAgo?.toDouble() ?? double.infinity)));

View File

@ -208,18 +208,27 @@ class _HomeViewState extends State<HomeView> with TickerProviderStateMixin {
return Scaffold( return Scaffold(
appBar: appBar ?? appBar: appBar ??
AppBar( AppBar(
centerTitle: false, centerTitle: false,
actions: [ actions: [
IconButton( IconButton(
icon: Icon(currentIndex == 3 icon: Icon(currentIndex == 3
? Icons.exit_to_app_outlined ? Icons.exit_to_app_outlined
: Icons.search_outlined), : Icons.search_outlined),
onPressed: () => _pageController.indexIsChanging onPressed: () => _pageController.indexIsChanging
? null ? null
: _onAppBarButtonTap.add(currentIndex), : _onAppBarButtonTap.add(currentIndex),
), ),
], ],
title: Text(title)), title: Text(title),
elevation:
AdaptivePageLayout.of(context).columnMode(context) ? 0 : null,
bottom: AdaptivePageLayout.of(context).columnMode(context)
? PreferredSize(
preferredSize: Size.fromHeight(1),
child: Divider(height: 1),
)
: null,
),
body: TabBarView( body: TabBarView(
controller: _pageController, controller: _pageController,
children: [ children: [