fix: some UI changes pt:2
This commit is contained in:
parent
2742f58af5
commit
e0cd43c63c
14 changed files with 96 additions and 62 deletions
|
@ -18,7 +18,9 @@ import ani.dantotsu.profile.ProfileActivity
|
|||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.xwray.groupie.GroupieAdapter
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
class NotificationActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityFollowBinding
|
||||
|
@ -41,13 +43,16 @@ class NotificationActivity : AppCompatActivity() {
|
|||
binding.listBack.setOnClickListener {
|
||||
onBackPressed()
|
||||
}
|
||||
|
||||
binding.listProgressBar.visibility = ViewGroup.VISIBLE
|
||||
lifecycleScope.launch {
|
||||
val res = Anilist.query.getNotifications(Anilist.userid?:0)
|
||||
res?.data?.page?.notifications?.let { notifications ->
|
||||
notificationList = notifications
|
||||
adapter.update(notificationList.map { NotificationItem(it, ::onNotificationClick) })
|
||||
}
|
||||
withContext(Dispatchers.Main){
|
||||
binding.listProgressBar.visibility = ViewGroup.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue