Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4174a25 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix crash in RowAlertTimeCoordinator when a group has no children

Change-Id: I05cabc284aa6112801be688f2c024ae6d6558ec9
Fixes: 327243612
Test: manual
Flag: NONE
parent ee92426e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ class RowAlertTimeCoordinator @Inject constructor() : Coordinator {
    }

    private fun GroupEntry.calculateLatestAlertTime(): Long {
        val lastChildAlertedTime = children.maxOf { it.lastAudiblyAlertedMs }
        val lastChildAlertedTime = children.maxOfOrNull { it.lastAudiblyAlertedMs } ?: 0
        val summaryAlertedTime = checkNotNull(summary).lastAudiblyAlertedMs
        return max(lastChildAlertedTime, summaryAlertedTime)
    }