mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
Change the way menu appear in conversations list screen
This commit is contained in:
parent
6cb9fd97e2
commit
5ccd3d4884
@ -1,6 +1,7 @@
|
||||
import 'package:comunic/helpers/conversations_helper.dart';
|
||||
import 'package:comunic/lists/users_list.dart';
|
||||
import 'package:comunic/models/conversation.dart';
|
||||
import 'package:comunic/ui/widgets/custom_list_tile.dart';
|
||||
import 'package:comunic/utils/date_utils.dart';
|
||||
import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:comunic/utils/ui_utils.dart';
|
||||
@ -52,7 +53,7 @@ class ConversationTile extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
return CustomListTile(
|
||||
onTap: () => onOpen(conversation),
|
||||
// Conversation name
|
||||
title: Text(
|
||||
@ -94,9 +95,11 @@ class ConversationTile extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
|
||||
// Trailing information
|
||||
trailing: PopupMenuButton<_PopupMenuChoices>(
|
||||
itemBuilder: (b) => <PopupMenuEntry<_PopupMenuChoices>>[
|
||||
onLongPressOpenMenu: (position) {
|
||||
showMenu<_PopupMenuChoices>(
|
||||
context: context,
|
||||
position: position,
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
child: Text(tr("Update")),
|
||||
value: _PopupMenuChoices.UPDATE,
|
||||
@ -105,9 +108,8 @@ class ConversationTile extends StatelessWidget {
|
||||
child: Text(tr("Delete")),
|
||||
value: _PopupMenuChoices.DELETE,
|
||||
)
|
||||
],
|
||||
onSelected: _conversationMenuCallback,
|
||||
),
|
||||
]).then(_conversationMenuCallback);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user