feat(social): filter activity only with in 3days
This commit is contained in:
parent
133354a22d
commit
90b9b7bef3
7 changed files with 40 additions and 30 deletions
|
@ -42,6 +42,7 @@ import ani.dantotsu.setSlideIn
|
|||
import ani.dantotsu.setSlideUp
|
||||
import ani.dantotsu.settings.SettingsDialogFragment
|
||||
import ani.dantotsu.settings.saving.PrefManager
|
||||
import ani.dantotsu.settings.saving.PrefManager.asLiveBool
|
||||
import ani.dantotsu.settings.saving.PrefName
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.statusBarHeight
|
||||
|
@ -56,7 +57,6 @@ import kotlin.math.min
|
|||
class HomeFragment : Fragment() {
|
||||
private var _binding: FragmentHomeBinding? = null
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
|
@ -322,7 +322,12 @@ class HomeFragment : Fragment() {
|
|||
binding.homeUserStatusRecyclerView.visibility = View.GONE
|
||||
if (it != null) {
|
||||
if (it.isNotEmpty()) {
|
||||
binding.homeUserStatusRecyclerView.adapter = UserStatusAdapter(it)
|
||||
PrefManager.getLiveVal(PrefName.RefreshStatus, false).apply {
|
||||
asLiveBool()
|
||||
observe(viewLifecycleOwner) { _ ->
|
||||
binding.homeUserStatusRecyclerView.adapter = UserStatusAdapter(it)
|
||||
}
|
||||
}
|
||||
binding.homeUserStatusRecyclerView.layoutManager = LinearLayoutManager(
|
||||
requireContext(),
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue