mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Show a message if user has no conversation yet
This commit is contained in:
		@@ -1,3 +1,5 @@
 | 
			
		||||
import 'dart:math';
 | 
			
		||||
 | 
			
		||||
import 'package:comunic/enums/load_error_level.dart';
 | 
			
		||||
import 'package:comunic/helpers/conversations_helper.dart';
 | 
			
		||||
import 'package:comunic/helpers/events_helper.dart';
 | 
			
		||||
@@ -179,6 +181,14 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
 | 
			
		||||
                  physics: AlwaysScrollableScrollPhysics(),
 | 
			
		||||
                  controller: ScrollController(),
 | 
			
		||||
                  itemBuilder: (context, index) {
 | 
			
		||||
                    if (_list!.isEmpty)
 | 
			
		||||
                      return Padding(
 | 
			
		||||
                        padding: const EdgeInsets.all(8.0),
 | 
			
		||||
                        child: Center(
 | 
			
		||||
                            child: Text(
 | 
			
		||||
                                tr("You do not have any conversation yet!")!)),
 | 
			
		||||
                      );
 | 
			
		||||
 | 
			
		||||
                    if (_list![index].isGroupConversation &&
 | 
			
		||||
                        !_list![index].following) return Container();
 | 
			
		||||
 | 
			
		||||
@@ -193,7 +203,7 @@ class _ConversationScreenState extends SafeState<ConversationsListScreen> {
 | 
			
		||||
                      onRequestLeave: _requestLeaveConversation,
 | 
			
		||||
                    );
 | 
			
		||||
                  },
 | 
			
		||||
                  itemCount: _list!.length,
 | 
			
		||||
                  itemCount: max(_list!.length, 1),
 | 
			
		||||
                ),
 | 
			
		||||
              ),
 | 
			
		||||
            ),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user