MESSENGER_2910 fix invite to personal notes && dms

This commit is contained in:
Frank Rotermund
2022-05-10 16:24:55 +02:00
parent 64c578ef36
commit 7ff40f95c7
@@ -90,7 +90,8 @@
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.showParticipantCustomAccessoryView = YES;
self.showInviteUserFab = YES;
self.showInviteUserFab = NO;
}
- (void)viewDidLoad
@@ -529,21 +530,15 @@
{
AccountRestrictionService *service = [[AccountRestrictionService alloc] initWithMxSession:room.mxSession];
if ((room.isDirect && !BwiBuildSettings.allowInviteOnDirectRooms) || room.isPersonalNotesRoom || [service isAddressListRestriction])
self.showInviteUserFab = !(room.isDirect || BwiBuildSettings.allowInviteOnDirectRooms) && !room.isPersonalNotesRoom
&& ![service isAddressListRestriction];
if (_showInviteUserFab)
{
// Remove invite members button if exists
[self->inviteFabImageView removeFromSuperview];
self->inviteFabImageView = nil;
}
else
{
// Add invite members button programmatically if does not exist
if (!self->inviteFabImageView)
{
self->inviteFabImageView = [self vc_addFABWithImage:[UIImage imageNamed:@"add_member_floating_action"]
target:self
action:@selector(onAddParticipantButtonPressed)];
}
// Add invite members button programmatically
[self vc_addFABWithImage:AssetImages.addMemberFloatingAction.image
target:self
action:@selector(onAddParticipantButtonPressed)];
}
}