Hide online presence

This commit is contained in:
Arnfried Griesert
2022-06-30 12:13:20 +02:00
parent d292279e45
commit 56f946a0d0
4 changed files with 26 additions and 25 deletions
@@ -316,33 +316,34 @@
- (void)refreshContactPresence
{
NSString* presenceText;
NSString* matrixId = self.firstMatrixId;
if (matrixId)
{
MXUser *user = nil;
if (BuildSettings.allowLocalContactPresence) {
NSString* presenceText;
NSString* matrixId = self.firstMatrixId;
// Consider here all sessions reported into contact manager
NSArray* mxSessions = [MXKContactManager sharedManager].mxSessions;
for (MXSession *mxSession in mxSessions)
if (matrixId)
{
user = [mxSession userWithUserId:matrixId];
if (user)
MXUser *user = nil;
// Consider here all sessions reported into contact manager
NSArray* mxSessions = [MXKContactManager sharedManager].mxSessions;
for (MXSession *mxSession in mxSessions)
{
break;
user = [mxSession userWithUserId:matrixId];
if (user)
{
break;
}
}
presenceText = [Tools presenceText:user];
}
presenceText = [Tools presenceText:user];
else if (contact.isThirdPartyInvite)
{
presenceText = [VectorL10n roomParticipantsOffline];
}
self.contactInformationLabel.text = presenceText;
}
else if (contact.isThirdPartyInvite)
{
presenceText = [VectorL10n roomParticipantsOffline];
}
self.contactInformationLabel.text = presenceText;
}
#pragma mark - events