mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-25 12:28:50 +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,20 +95,21 @@ class ConversationTile extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
|
||||
// Trailing information
|
||||
trailing: PopupMenuButton<_PopupMenuChoices>(
|
||||
itemBuilder: (b) => <PopupMenuEntry<_PopupMenuChoices>>[
|
||||
PopupMenuItem(
|
||||
child: Text(tr("Update")),
|
||||
value: _PopupMenuChoices.UPDATE,
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Text(tr("Delete")),
|
||||
value: _PopupMenuChoices.DELETE,
|
||||
)
|
||||
],
|
||||
onSelected: _conversationMenuCallback,
|
||||
),
|
||||
onLongPressOpenMenu: (position) {
|
||||
showMenu<_PopupMenuChoices>(
|
||||
context: context,
|
||||
position: position,
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
child: Text(tr("Update")),
|
||||
value: _PopupMenuChoices.UPDATE,
|
||||
),
|
||||
PopupMenuItem(
|
||||
child: Text(tr("Delete")),
|
||||
value: _PopupMenuChoices.DELETE,
|
||||
)
|
||||
]).then(_conversationMenuCallback);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user