 	override func viewWillAppear(animated: Bool) {
 		if let recipient = recipient {
 			self.navigationItem.rightBarButtonItems = []
-			navigationItem.title = recipient.displayName
+			
+			if userDetails == nil {
+                navigationItem.title = recipient.displayName
+            }
+            
+            // Mark: Adding LastActivity functionality to NavigationBar
+            OneLastActivity.sendLastActivityQueryToJID((recipient.jidStr), sender: OneChat.sharedInstance.xmppLastActivity) { (response, forJID, error) -> Void in
+                let lastActivityResponse = OneLastActivity.sharedInstance.getLastActivityFrom((response?.lastActivitySeconds())!)
+                
+                self.userDetails = OneLastActivity.sharedInstance.addLastActivityLabelToNavigationBar(lastActivityResponse, displayName: recipient.displayName)
+                self.navigationController!.view.addSubview(self.userDetails!)
+            }
 			
 			dispatch_async(dispatch_get_main_queue(), { () -> Void in
 				self.messages = OneMessage.sharedInstance.loadArchivedMessagesFrom(jid: recipient.jidStr)
 				self.finishReceivingMessageAnimated(true)
 			})
 		} else {
-			navigationItem.title = "New message"
+			if userDetails == nil {
+                navigationItem.title = "New message"
+            }
 			
 			self.inputToolbar!.contentView!.rightBarButtonItem!.enabled = false
 			self.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: .Add, target: self, action: "addRecipient"), animated: true)

	var messages = NSMutableArray()
	var recipient: XMPPUserCoreDataStorageObject?
	var firstTime = true
	
	// Mark: Life Cycle
	

	
	func didSelectContact(recipient: XMPPUserCoreDataStorageObject) {
		self.recipient = recipient
		if userDetails == nil {
            navigationItem.title = recipient.displayName
        }
		
		if !OneChats.knownUserForJid(jidStr: recipient.jidStr) {
			OneChats.addUserToChatList(jidStr: recipient.jidStr)
