Skip to content

Commit

Permalink
Removed share button in profile for anonymous (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvld authored and Ostrenkiy committed Apr 4, 2018
1 parent aea0f50 commit 7e7e98e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Stepic/ProfileViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ class ProfileViewController: MenuViewController, ProfileView, ControllerWithStep
case .refreshing:
showPlaceholder(for: .refreshing)
case .anonymous:
navigationItem.rightBarButtonItem = nil
showPlaceholder(for: .anonymous)
case .error:
showPlaceholder(for: .connectionError)
case .authorized:
if let button = shareBarButtonItem {
navigationItem.rightBarButtonItem = button
}
isPlaceholderShown = false
}
}
Expand Down

0 comments on commit 7e7e98e

Please sign in to comment.