feat: open user links in dantotsu
This commit is contained in:
parent
353452dd21
commit
5c2ae57d77
6 changed files with 67 additions and 16 deletions
|
@ -67,8 +67,11 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
|
|||
binding.profileViewPager.isUserInputEnabled = false
|
||||
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
val userid = intent.getIntExtra("userId", 0)
|
||||
val respond = Anilist.query.getUserProfile(userid)
|
||||
val userid = intent.getIntExtra("userId", -1)
|
||||
val username = intent.getStringExtra("username") ?: ""
|
||||
val respond =
|
||||
if (userid != -1) Anilist.query.getUserProfile(userid) else
|
||||
Anilist.query.getUserProfile(username)
|
||||
val user = respond?.data?.user
|
||||
if (user == null) {
|
||||
toast("User not found")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue