diff --git a/Yep/ViewControllers/Contacts/ContactsViewController.swift b/Yep/ViewControllers/Contacts/ContactsViewController.swift index 44e9415a..0dd8405f 100644 --- a/Yep/ViewControllers/Contacts/ContactsViewController.swift +++ b/Yep/ViewControllers/Contacts/ContactsViewController.swift @@ -54,7 +54,9 @@ class ContactsViewController: BaseViewController { let vc = segue.destinationViewController as! ProfileViewController if let user = sender as? User { - vc.profileUser = ProfileUser.UserType(user) + if user.userID != YepUserDefaults.userID.value { + vc.profileUser = ProfileUser.UserType(user) + } } vc.hidesBottomBarWhenPushed = true diff --git a/Yep/ViewControllers/Conversation/ConversationViewController.swift b/Yep/ViewControllers/Conversation/ConversationViewController.swift index 0c39ccd6..455168a3 100644 --- a/Yep/ViewControllers/Conversation/ConversationViewController.swift +++ b/Yep/ViewControllers/Conversation/ConversationViewController.swift @@ -1039,9 +1039,9 @@ class ConversationViewController: BaseViewController { let vc = segue.destinationViewController as! ProfileViewController if let withFriend = conversation?.withFriend { - let profileUser = ProfileUser.UserType(withFriend) - - vc.profileUser = profileUser + if withFriend.userID != YepUserDefaults.userID.value { + vc.profileUser = ProfileUser.UserType(withFriend) + } vc.isFromConversation = true vc.setBackButtonWithTitle() diff --git a/Yep/ViewControllers/Discover/DiscoverViewController.swift b/Yep/ViewControllers/Discover/DiscoverViewController.swift index cbc55b1a..161f48a6 100644 --- a/Yep/ViewControllers/Discover/DiscoverViewController.swift +++ b/Yep/ViewControllers/Discover/DiscoverViewController.swift @@ -95,8 +95,10 @@ class DiscoverViewController: BaseViewController { let discoveredUser = discoveredUsers[indexPath.row] let vc = segue.destinationViewController as! ProfileViewController - - vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + + if discoveredUser.id != YepUserDefaults.userID.value { + vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + } vc.setBackButtonWithTitle() diff --git a/Yep/ViewControllers/Profile/ProfileViewController.swift b/Yep/ViewControllers/Profile/ProfileViewController.swift index caf83fc0..c1430f22 100644 --- a/Yep/ViewControllers/Profile/ProfileViewController.swift +++ b/Yep/ViewControllers/Profile/ProfileViewController.swift @@ -277,8 +277,8 @@ class ProfileViewController: UIViewController { sayHiView.hidden = true } else { - view.bringSubviewToFront(sayHiView) + sayHiButton.setTitle(NSLocalizedString("Say Hi", comment: ""), forState: .Normal) sayHiButton.layer.cornerRadius = 5 sayHiButton.backgroundColor = UIColor.yepTintColor() diff --git a/Yep/ViewControllers/SearchedUsers/SearchedUsersViewController.swift b/Yep/ViewControllers/SearchedUsers/SearchedUsersViewController.swift index 2de742a6..afa9bba5 100644 --- a/Yep/ViewControllers/SearchedUsers/SearchedUsersViewController.swift +++ b/Yep/ViewControllers/SearchedUsers/SearchedUsersViewController.swift @@ -56,7 +56,9 @@ class SearchedUsersViewController: UIViewController { let vc = segue.destinationViewController as! ProfileViewController - vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + if discoveredUser.id != YepUserDefaults.userID.value { + vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + } vc.setBackButtonWithTitle() diff --git a/Yep/ViewControllers/SkillHome/SkillHomeViewController.swift b/Yep/ViewControllers/SkillHome/SkillHomeViewController.swift index 5cc7bdef..3db21fec 100644 --- a/Yep/ViewControllers/SkillHome/SkillHomeViewController.swift +++ b/Yep/ViewControllers/SkillHome/SkillHomeViewController.swift @@ -262,7 +262,9 @@ class SkillHomeViewController: CustomNavigationBarViewController { let vc = segue.destinationViewController as! ProfileViewController - vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + if discoveredUser.id != YepUserDefaults.userID.value { + vc.profileUser = ProfileUser.DiscoveredUserType(discoveredUser) + } vc.hidesBottomBarWhenPushed = true