mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-01 19:26:48 +01:00
avoid fetching event attendees on the main thread
This commit is contained in:
parent
499cf50c4c
commit
711a26dbfc
@ -528,11 +528,9 @@ class EventActivity : SimpleActivity() {
|
||||
private fun checkAttendees() {
|
||||
ensureBackgroundThread {
|
||||
fillAvailableContacts()
|
||||
runOnUiThread {
|
||||
updateAttendees()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleNotificationAvailability(callback: () -> Unit) {
|
||||
if (NotificationManagerCompat.from(applicationContext).areNotificationsEnabled()) {
|
||||
@ -1357,6 +1355,7 @@ class EventActivity : SimpleActivity() {
|
||||
{ it.status })
|
||||
mAttendees.reverse()
|
||||
|
||||
runOnUiThread {
|
||||
mAttendees.forEach {
|
||||
val attendee = it
|
||||
val deviceContact = mAvailableContacts.firstOrNull { it.email.isNotEmpty() && it.email == attendee.email && it.photoUri.isNotEmpty() }
|
||||
@ -1376,6 +1375,7 @@ class EventActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun addAttendee(attendee: Attendee? = null) {
|
||||
val attendeeHolder = layoutInflater.inflate(R.layout.item_attendee, event_attendees_holder, false) as RelativeLayout
|
||||
|
Loading…
x
Reference in New Issue
Block a user