Advertisement
iamalizade

Untitled

Nov 20th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.76 KB | None | 0 0
  1. var chatList = NSMutableArray()
  2. var chatListBare = NSMutableArray()
  3.  
  4. public class func removeUserAtIndexPath(indexPath: NSIndexPath) {
  5.         let user = OneChats.getChatsList().objectAtIndex(indexPath.row) as! XMPPUserCoreDataStorageObject
  6.        
  7.         sharedInstance.removeMyUserActivityFromCoreDataStorageWith(user: user)
  8.         sharedInstance.removeUserActivityFromCoreDataStorage(user: user)
  9.         removeUserFromChatList(user: user)
  10.     }
  11.    
  12.     public class func removeUserFromChatList(user user: XMPPUserCoreDataStorageObject) {
  13.         if sharedInstance.chatList.containsObject(user) {
  14.             sharedInstance.chatList.removeObjectIdenticalTo(user)
  15.             sharedInstance.chatListBare.removeObjectIdenticalTo(user.jidStr)
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement