Refine code style
This commit is contained in:
@@ -34,7 +34,7 @@ object ServiceNotification {
|
|||||||
context.resources.getQuantityString(R.plurals.notification_connected_devices, size, size, dev)
|
context.resources.getQuantityString(R.plurals.notification_connected_devices, size, size, dev)
|
||||||
}
|
}
|
||||||
if (inactive.isNotEmpty()) {
|
if (inactive.isNotEmpty()) {
|
||||||
lines += context.getString(R.string.notification_interfaces_inactive) + inactive.joinToString()
|
lines += context.getString(R.string.notification_interfaces_inactive, inactive.joinToString())
|
||||||
}
|
}
|
||||||
return if (lines.size <= 1) builder.setContentText(lines.singleOrNull()).build() else {
|
return if (lines.size <= 1) builder.setContentText(lines.singleOrNull()).build() else {
|
||||||
val deviceCount = deviceCounts.sumBy { it.value }
|
val deviceCount = deviceCounts.sumBy { it.value }
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
<plurals name="notification_interfaces">
|
<plurals name="notification_interfaces">
|
||||||
<item quantity="other">%d 个接口</item>
|
<item quantity="other">%d 个接口</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="notification_interfaces_inactive">不活跃:</string>
|
<string name="notification_interfaces_inactive">不活跃:%s</string>
|
||||||
|
|
||||||
<string name="failure_reason_unknown">未知 #%d</string>
|
<string name="failure_reason_unknown">未知 #%d</string>
|
||||||
<string name="exception_interface_not_found">错误:未找到下游接口</string>
|
<string name="exception_interface_not_found">错误:未找到下游接口</string>
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
<item quantity="one">%d interface</item>
|
<item quantity="one">%d interface</item>
|
||||||
<item quantity="other">%d interfaces</item>
|
<item quantity="other">%d interfaces</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="notification_interfaces_inactive">"Inactive: "</string>
|
<string name="notification_interfaces_inactive">Inactive: %s</string>
|
||||||
|
|
||||||
<string name="failure_reason_unknown">unknown #%d</string>
|
<string name="failure_reason_unknown">unknown #%d</string>
|
||||||
<string name="exception_interface_not_found">Fatal: Downstream interface not found</string>
|
<string name="exception_interface_not_found">Fatal: Downstream interface not found</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user