fix: automate getting contributions (#314)

* fix: automate getting contributions

It shouldn't need to be a conscious decision. It would be nice if the site_admin  flag worked for the repo owner, but it's a known value

* fix: also populate the forks page

This hardcodes this repo, since downstream builds should still display the upstream forks
This commit is contained in:
TwistedUmbrellaX
2024-04-02 19:08:44 -04:00
committed by GitHub
parent 55bc2add85
commit ba1725224a
4 changed files with 143 additions and 68 deletions

View File

@@ -7,21 +7,13 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import ani.dantotsu.BottomSheetDialogFragment
import ani.dantotsu.R
import ani.dantotsu.connections.github.Forks
import ani.dantotsu.databinding.BottomSheetDevelopersBinding
class ForksDialogFragment : BottomSheetDialogFragment() {
private var _binding: BottomSheetDevelopersBinding? = null
private val binding get() = _binding!!
private val developers = arrayOf(
Developer(
"Dantotsu",
"https://avatars.githubusercontent.com/u/87634197?v=4",
"rebelonion",
"https://github.com/rebelonion/Dantotsu"
),
)
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
@@ -34,7 +26,7 @@ class ForksDialogFragment : BottomSheetDialogFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.devsTitle.setText(R.string.forks)
binding.devsRecyclerView.adapter = DevelopersAdapter(developers)
binding.devsRecyclerView.adapter = DevelopersAdapter(Forks().getForks())
binding.devsRecyclerView.layoutManager = LinearLayoutManager(requireContext())
}