Chat list is shown when rooms are loaded
This commit is contained in:
parent
47345d99bd
commit
347fa01ff8
2 changed files with 13 additions and 2 deletions
|
|
@ -909,6 +909,9 @@ class ChatListController extends State<ChatList>
|
|||
Future<void> _waitForFirstSync() async {
|
||||
final client = Matrix.of(context).client;
|
||||
await client.roomsLoading;
|
||||
// #Pangea
|
||||
setState(() {});
|
||||
// Pangea#
|
||||
await client.accountDataLoading;
|
||||
await client.userDeviceKeysLoading;
|
||||
if (client.prevBatch == null) {
|
||||
|
|
|
|||
|
|
@ -187,7 +187,12 @@ class ChatListViewBody extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
if (client.prevBatch == null)
|
||||
// #Pangea
|
||||
// Only show loading screen if room list is empty
|
||||
// because it is still loading
|
||||
// if (client.prevBatch == null)
|
||||
if (rooms.isEmpty && client.prevBatch == null)
|
||||
// Pangea#
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, i) => Opacity(
|
||||
|
|
@ -245,7 +250,10 @@ class ChatListViewBody extends StatelessWidget {
|
|||
childCount: dummyChatCount,
|
||||
),
|
||||
),
|
||||
if (client.prevBatch != null)
|
||||
// #Pangea
|
||||
// if (client.prevBatch != null)
|
||||
if (rooms.isNotEmpty)
|
||||
// Pangea#
|
||||
SliverList.builder(
|
||||
itemCount: rooms.length,
|
||||
itemBuilder: (BuildContext context, int i) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue