Do not display an empty groups selection

If no group is set for the current mailbox, do not display the groups selection space when starting a new conversation.
This commit is contained in:
Antoine Le Gonidec 2024-07-30 11:55:22 +02:00
parent bfc5f6849f
commit 04429115cf
Signed by: vv221
GPG key ID: 636B78F91CEB80D8

View file

@ -102,6 +102,8 @@ class MMFCustomersGroupsServiceProvider extends ServiceProvider {
// as the one that has been passed does not have a "groups" relationship.
$mailbox = Mailbox::find($mailbox->id);
$groups = $mailbox->groups;
// Do not add the groups selection space if no group is set.
if ( $groups->isEmpty() ) return;
echo View::make(
'mmfcustomersgroups::conversations/partials/groups-selection',
[