Skip to content

Commit

Permalink
Avoid ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
orkun1675 committed Dec 10, 2024
1 parent ec174d1 commit c20ee36
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class AlarmApiImpl(private val context: Context) : AlarmApi {
for (alarm in AlarmStorage(context).getSavedAlarms()) {
stopAlarm(alarm.id.toLong())
}
for (alarmId in alarmIds.toList()) {
val alarmIdsCopy = alarmIds.toList()
for (alarmId in alarmIdsCopy) {
stopAlarm(alarmId.toLong())
}
}
Expand Down

0 comments on commit c20ee36

Please sign in to comment.