Skip to content

Commit

Permalink
Refactored out function
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Dahlberg committed Feb 19, 2021
1 parent 3cf93bd commit 3f8de8d
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,20 @@ class IndivProfileSettings : Fragment() {
}

private fun hideSignedInViews() {
var views: Array<View> = arrayOf(
arrayOf(
updatePublicProfileContainer,
updateAccountInfoContainer,
setupNotificationSettingsContainer,
signoutContainer,
)
setViewsVisibility(views, View.GONE)
).forEach {
it.visibility = View.GONE
}
}

private fun hideSignedOutViews() {
myAccountContainer.visibility = View.GONE
}

private fun setViewsVisibility(views: Array<View>, value: Int) {
views.forEach {
it.visibility = value
}
}

private fun openWebView(url: String?) {
val intent = Intent(requireContext(), WebViewerActivity::class.java)
intent.putExtra("url", url)
Expand Down

0 comments on commit 3f8de8d

Please sign in to comment.