Revision 80684e32 ChatSecure/Classes/View Controllers/OTRRoomOccupantsViewController.swift
ChatSecure/Classes/View Controllers/OTRRoomOccupantsViewController.swift | ||
---|---|---|
330 | 330 |
fileprivate func fetchMembersList() { |
331 | 331 |
guard let xmppRoom = xmppRoom() else { return } |
332 | 332 |
xmppRoom.fetchMembersList() |
333 |
xmppRoom.fetchModeratorsList() |
|
334 | 333 |
} |
335 | 334 |
} |
336 | 335 |
|
... | ... | |
360 | 359 |
let cell:OTRBuddyInfoCheckableCell = tableView.dequeueReusableCell(withIdentifier: OTRRoomOccupantsViewController.CellIdentifier, for: indexPath) as! OTRBuddyInfoCheckableCell |
361 | 360 |
cell.setCheckImage(image: self.crownImage) |
362 | 361 |
var buddy:OTRXMPPBuddy? = nil |
363 |
var accountObject:OTRXMPPAccount? = nil |
|
364 | 362 |
if let roomOccupant = self.viewHandler?.object(indexPath) as? OTRXMPPRoomOccupant, let room = self.room, let jidString = roomOccupant.realJID ?? roomOccupant.jid, let jid = XMPPJID(string: jidString), let account = room.accountUniqueId { |
365 | 363 |
OTRDatabaseManager.shared.readOnlyDatabaseConnection?.read({ (transaction) in |
366 | 364 |
buddy = OTRXMPPBuddy.fetchBuddy(jid: jid, accountUniqueId: account, transaction: transaction) |
367 |
accountObject = OTRXMPPAccount.fetchObject(withUniqueID: account, transaction: transaction) |
|
368 | 365 |
}) |
369 | 366 |
if let buddy = buddy { |
370 | 367 |
cell.setThread(buddy, account: nil) |
371 | 368 |
if let occupantJid = roomOccupant.jid, let ownJid = ownOccupant?.jid, occupantJid.compare(ownJid) == .orderedSame { |
372 |
if let accountObject = accountObject { |
|
373 |
cell.avatarImageView.image = accountObject.avatarImage() |
|
374 |
} |
|
375 | 369 |
cell.nameLabel.text?.append(" (" + GROUP_INFO_YOU() + ")") |
376 | 370 |
} |
377 | 371 |
} else if let roomJid = room.jid { |
Also available in: Unified diff