feat: Delete,edit activity
This commit is contained in:
parent
6878d12b5c
commit
ea75197120
16 changed files with 336 additions and 208 deletions
|
@ -136,7 +136,7 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
|
|||
|
||||
followButton.setOnClickListener {
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
val res = Anilist.query.toggleFollow(user.id)
|
||||
val res = Anilist.mutation.toggleFollow(user.id)
|
||||
if (res?.data?.toggleFollow != null) {
|
||||
withContext(Dispatchers.Main) {
|
||||
snackString(R.string.success)
|
||||
|
@ -325,7 +325,7 @@ class ProfileActivity : AppCompatActivity(), AppBarLayout.OnOffsetChangedListene
|
|||
override fun getItemCount(): Int = 3
|
||||
override fun createFragment(position: Int): Fragment = when (position) {
|
||||
0 -> ProfileFragment.newInstance(user)
|
||||
1 -> ActivityFragment(ActivityType.OTHER_USER, user.id)
|
||||
1 -> ActivityFragment.newInstance(ActivityType.OTHER_USER, user.id)
|
||||
2 -> StatsFragment.newInstance(user)
|
||||
else -> ProfileFragment.newInstance(user)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue