mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
chore: Move connection status header to bottom
This commit is contained in:
parent
1077883bda
commit
20596a2c5d
@ -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/pages/chat_list/stories_header.dart';
|
||||||
import 'package:fluffychat/utils/url_launcher.dart';
|
import 'package:fluffychat/utils/url_launcher.dart';
|
||||||
import 'package:fluffychat/widgets/avatar.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/profile_bottom_sheet.dart';
|
||||||
import 'package:fluffychat/widgets/public_room_bottom_sheet.dart';
|
import 'package:fluffychat/widgets/public_room_bottom_sheet.dart';
|
||||||
import '../../utils/stream_extension.dart';
|
import '../../utils/stream_extension.dart';
|
||||||
@ -76,7 +75,6 @@ class _ChatListViewBodyState extends State<ChatListViewBody> {
|
|||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const ConnectionStatusHeader(),
|
|
||||||
SpaceRoomListTopBar(widget.controller),
|
SpaceRoomListTopBar(widget.controller),
|
||||||
if (roomSearchResult != null) ...[
|
if (roomSearchResult != null) ...[
|
||||||
SearchTitle(
|
SearchTitle(
|
||||||
|
@ -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.dart';
|
||||||
import 'package:fluffychat/pages/chat_list/chat_list_drawer.dart';
|
import 'package:fluffychat/pages/chat_list/chat_list_drawer.dart';
|
||||||
|
import 'package:fluffychat/widgets/connection_status_header.dart';
|
||||||
import '../../widgets/matrix.dart';
|
import '../../widgets/matrix.dart';
|
||||||
import 'chat_list_body.dart';
|
import 'chat_list_body.dart';
|
||||||
import 'chat_list_header.dart';
|
import 'chat_list_header.dart';
|
||||||
@ -33,6 +34,7 @@ class ChatListView extends StatelessWidget {
|
|||||||
appBar: ChatListHeader(controller: controller),
|
appBar: ChatListHeader(controller: controller),
|
||||||
body: ChatListViewBody(controller),
|
body: ChatListViewBody(controller),
|
||||||
drawer: ChatListDrawer(controller),
|
drawer: ChatListDrawer(controller),
|
||||||
|
bottomNavigationBar: const ConnectionStatusHeader(),
|
||||||
floatingActionButton: selectMode == SelectMode.normal
|
floatingActionButton: selectMode == SelectMode.normal
|
||||||
? KeyBoardShortcuts(
|
? KeyBoardShortcuts(
|
||||||
child:
|
child:
|
||||||
|
@ -34,11 +34,12 @@ class _ConnectionStatusHeaderState extends State<ConnectionStatusHeader> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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);
|
const SyncStatusUpdate(SyncStatus.waitingForResponse);
|
||||||
final hide = Matrix.of(context).client.onSync.value != null &&
|
final hide = client.onSync.value != null &&
|
||||||
status.status != SyncStatus.error &&
|
status.status != SyncStatus.error &&
|
||||||
Matrix.of(context).client.prevBatch != null;
|
client.prevBatch != null;
|
||||||
|
|
||||||
return AnimatedContainer(
|
return AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
|
Loading…
Reference in New Issue
Block a user