mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-14 20:22:15 -04:00
everything but chat
This commit is contained in:
parent
ba73123702
commit
2e4deb2038
6 changed files with 23 additions and 65 deletions
|
@ -1,10 +1,7 @@
|
|||
import 'package:awesome_extensions/awesome_extensions.dart';
|
||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../proto/proto.dart' as proto;
|
||||
import '../../../account_manager/account_manager.dart';
|
||||
import '../../../tools/tools.dart';
|
||||
import '../../../../chat_list/chat_list.dart';
|
||||
|
||||
class ChatsPage extends StatefulWidget {
|
||||
const ChatsPage({super.key});
|
||||
|
@ -30,16 +27,8 @@ class ChatsPageState extends State<ChatsPage> {
|
|||
@override
|
||||
// ignore: prefer_expression_function_bodies
|
||||
Widget build(BuildContext context) {
|
||||
final contactList = ref.watch(fetchContactListProvider).asData?.value ??
|
||||
const IListConst([]);
|
||||
final chatList =
|
||||
ref.watch(fetchChatListProvider).asData?.value ?? const IListConst([]);
|
||||
|
||||
return Column(children: <Widget>[
|
||||
if (chatList.isNotEmpty)
|
||||
ChatSingleContactListWidget(
|
||||
contactList: contactList, chatList: chatList)
|
||||
.expanded(),
|
||||
if (chatList.isEmpty) const EmptyChatListWidget().expanded(),
|
||||
const ChatSingleContactListWidget().expanded(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue