mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 06:37:30 +00:00
show full count on longclick
This commit is contained in:
parent
a6194bf6b8
commit
d3ac655784
@ -13,6 +13,7 @@ import android.view.*
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
|
import androidx.appcompat.widget.TooltipCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentTransaction
|
import androidx.fragment.app.FragmentTransaction
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
@ -680,6 +681,9 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall
|
|||||||
}
|
}
|
||||||
binding.header.mainPostCount.visibility = View.VISIBLE
|
binding.header.mainPostCount.visibility = View.VISIBLE
|
||||||
binding.header.mainPostCount.text = getCountSpan(R.plurals.main_posts_count, abbreviate(count, null), count)
|
binding.header.mainPostCount.text = getCountSpan(R.plurals.main_posts_count, abbreviate(count, null), count)
|
||||||
|
if (count >= 1000) {
|
||||||
|
TooltipCompat.setTooltipText(binding.header.mainPostCount, count.toString(10))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupFollowing(count: Long?) {
|
private fun setupFollowing(count: Long?) {
|
||||||
@ -696,6 +700,9 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
binding.header.mainFollowing.setOnClickListener(onFollowingClickListener)
|
binding.header.mainFollowing.setOnClickListener(onFollowingClickListener)
|
||||||
|
if (count >= 1000) {
|
||||||
|
TooltipCompat.setTooltipText(binding.header.mainFollowing, count.toString(10))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupFollowers(count: Long?) {
|
private fun setupFollowers(count: Long?) {
|
||||||
@ -710,6 +717,9 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
binding.header.mainFollowers.setOnClickListener(onFollowersClickListener)
|
binding.header.mainFollowers.setOnClickListener(onFollowersClickListener)
|
||||||
|
if (count >= 1000) {
|
||||||
|
TooltipCompat.setTooltipText(binding.header.mainFollowers, count.toString(10))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupDMButton(currentUser: User?, profile: User?) {
|
private fun setupDMButton(currentUser: User?, profile: User?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user