mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-15 07:45:55 +10:00
check all showProfile, make sure NOT set profileUser when it's self
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user