Show "remote profile" message. (#873)
* Show "remote profile" message. Closes #806 * Improve remote message look
This commit is contained in:
parent
a0988dc6c6
commit
6051ffe0b3
6 changed files with 30 additions and 10 deletions
|
@ -361,6 +361,13 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasSupportF
|
|||
accountFragmentViewPager.hide()
|
||||
}
|
||||
|
||||
if (account.isRemote()) {
|
||||
accountRemoveView.show()
|
||||
accountRemoveView.setOnClickListener {
|
||||
LinkHelper.openLink(account.url, this)
|
||||
}
|
||||
}
|
||||
|
||||
val numberFormat = NumberFormat.getNumberInstance()
|
||||
accountFollowersTextView.text = numberFormat.format(account.followersCount)
|
||||
accountFollowingTextView.text = numberFormat.format(account.followingCount)
|
||||
|
|
|
@ -64,6 +64,7 @@ data class Account(
|
|||
return account?.id == this.id
|
||||
}
|
||||
|
||||
fun isRemote(): Boolean = this.username != this.localUsername
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
|
|
|
@ -11,9 +11,5 @@ fun View.hide() {
|
|||
}
|
||||
|
||||
fun View.visible(visible: Boolean) {
|
||||
this.visibility = if(visible) {
|
||||
View.VISIBLE
|
||||
} else {
|
||||
View.GONE
|
||||
}
|
||||
this.visibility = if (visible) View.VISIBLE else View.GONE
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue