chore: Move connection status header to bottom

This commit is contained in:
Christian Pauly 2022-08-06 10:08:17 +02:00
parent 1077883bda
commit 20596a2c5d
3 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,6 @@ import 'package:fluffychat/pages/chat_list/spaces_entry.dart';
import 'package:fluffychat/pages/chat_list/stories_header.dart';
import 'package:fluffychat/utils/url_launcher.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/connection_status_header.dart';
import 'package:fluffychat/widgets/profile_bottom_sheet.dart';
import 'package:fluffychat/widgets/public_room_bottom_sheet.dart';
import '../../utils/stream_extension.dart';
@ -76,7 +75,6 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
const ConnectionStatusHeader(),
SpaceRoomListTopBar(widget.controller),
if (roomSearchResult != null) ...[
SearchTitle(

View File

@ -7,6 +7,7 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/chat_list/chat_list.dart';
import 'package:fluffychat/pages/chat_list/chat_list_drawer.dart';
import 'package:fluffychat/widgets/connection_status_header.dart';
import '../../widgets/matrix.dart';
import 'chat_list_body.dart';
import 'chat_list_header.dart';
@ -33,6 +34,7 @@ class ChatListView extends StatelessWidget {
appBar: ChatListHeader(controller: controller),
body: ChatListViewBody(controller),
drawer: ChatListDrawer(controller),
bottomNavigationBar: const ConnectionStatusHeader(),
floatingActionButton: selectMode == SelectMode.normal
? KeyBoardShortcuts(
child:

View File

@ -34,11 +34,12 @@ class _ConnectionStatusHeaderState extends State<ConnectionStatusHeader> {
@override
Widget build(BuildContext context) {
final status = Matrix.of(context).client.onSyncStatus.value ??
final client = Matrix.of(context).client;
final status = client.onSyncStatus.value ??
const SyncStatusUpdate(SyncStatus.waitingForResponse);
final hide = Matrix.of(context).client.onSync.value != null &&
final hide = client.onSync.value != null &&
status.status != SyncStatus.error &&
Matrix.of(context).client.prevBatch != null;
client.prevBatch != null;
return AnimatedContainer(
duration: const Duration(milliseconds: 200),