OK, fair point.
I've created a .isFlattenGroupEnabled() method in ConfigurationUtils and I now use that to control whether groups are flattened.
I've left the isCreateGroupDisabled check in MetaContactRightButtonMenu as I don't think we should be displaying "Move To" menu if group creation is disabled.
A new patch is attached.
Flatten Groups.patch (21.1 KB)
From: Emil Ivov [mailto:email@example.com]
Sent: 20 February 2013 00:50
Cc: Tom Denham
Subject: Re: [jitsi-dev] [PATCH] Remove contact groups from UI through config
On 19.02.13, 15:47, Tom Denham wrote:
I've had the need to remove support for contact groups from the Jitsi
UI. I've implemented this using by introducing a new bit of config
that can be set in the provisioning file.
It seems to me that you are actually reusing an existing bit of config which is not quite right.
IIRC ConfigurationUtils.isCreateGroupDisabled() indicates whether or not adding new groups should be allowed. It does not necessarily imply that all the tree hierarchy should be flattened.
I know ithers are already using this option _with_ server defined directory set.
Unless this config is explicitly set there will be no change in the UI
As a bonus this patch cleans up a few minor bits of code formatting
elsewhere in the code...
I'll check this in in the next day or two if no one objects.