Migrate from deprecated APIs

This commit is contained in:
Mygod
2021-05-05 10:04:55 -04:00
parent 71bfeb059b
commit 5c4f88967b
6 changed files with 23 additions and 28 deletions

View File

@@ -38,7 +38,7 @@ object ServiceNotification {
lines += context.getString(R.string.notification_interfaces_inactive, inactive.joinToString())
}
return if (lines.size <= 1) builder.setContentText(lines.singleOrNull()).build() else {
val deviceCount = deviceCounts.sumBy { it.value }
val deviceCount = deviceCounts.sumOf { it.value }
val interfaceCount = deviceCounts.size + inactive.size
NotificationCompat.BigTextStyle(builder
.setContentText(context.resources.getQuantityString(R.plurals.notification_connected_devices,