mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-03-18 20:30:16 +01:00
catch and ignore ConcurrentModificationException on some other places too
This commit is contained in:
parent
65a9600f75
commit
97518b98f5
@ -1292,8 +1292,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
minFetchedSearchTS -= FETCH_INTERVAL
|
||||
eventsHelper.getEvents(minFetchedSearchTS, oldMinFetchedTS) { events ->
|
||||
events.forEach { event ->
|
||||
if (searchResultEvents.firstOrNull { it.id == event.id && it.startTS == event.startTS } == null) {
|
||||
searchResultEvents.add(0, event)
|
||||
try {
|
||||
if (searchResultEvents.firstOrNull { it.id == event.id && it.startTS == event.startTS } == null) {
|
||||
searchResultEvents.add(0, event)
|
||||
}
|
||||
} catch (ignored: ConcurrentModificationException) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1306,8 +1309,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
maxFetchedSearchTS += FETCH_INTERVAL
|
||||
eventsHelper.getEvents(oldMaxFetchedTS, maxFetchedSearchTS) { events ->
|
||||
events.forEach { event ->
|
||||
if (searchResultEvents.firstOrNull { it.id == event.id && it.startTS == event.startTS } == null) {
|
||||
searchResultEvents.add(0, event)
|
||||
try {
|
||||
if (searchResultEvents.firstOrNull { it.id == event.id && it.startTS == event.startTS } == null) {
|
||||
searchResultEvents.add(0, event)
|
||||
}
|
||||
} catch (ignored: ConcurrentModificationException) {
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user