Skip to content

Instantly share code, notes, and snippets.

@umwelt
Created January 21, 2019 16:26
Show Gist options
  • Save umwelt/613a5cf7280677a298400da0bdc587b3 to your computer and use it in GitHub Desktop.
Save umwelt/613a5cf7280677a298400da0bdc587b3 to your computer and use it in GitHub Desktop.
ExpertSocial Status
let connectionValue = ConnectionValues(rawValue: expert.connectionStatus.isBeingFollowed)
switch connectionValue {
case .some(.NONE), .none:
header.currentButtonState = .follow
header.setButtonState(forButton: header.followButton, state: .follow)
case .some(.ACCEPTED):
header.currentButtonState = .following
header.setButtonState(forButton: header.followButton, state: .following)
case .some(.PENDING), .some(.BLOCKED):
print("none")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment