wear: shorten mesh status notification

This commit is contained in:
callebtc 2026-07-29 12:48:12 +02:00
parent c6e64b1da8
commit 538701c753
2 changed files with 12 additions and 7 deletions

View File

@ -144,11 +144,15 @@ class WearMeshForegroundService : Service() {
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle(getString(R.string.app_name))
.setContentText(
resources.getQuantityString(
R.plurals.mesh_notification_text,
activePeers,
activePeers
)
if (activePeers == 0) {
getString(R.string.mesh_notification_no_peers)
} else {
resources.getQuantityString(
R.plurals.mesh_notification_text,
activePeers,
activePeers
)
}
)
.setContentIntent(launchIntent)
.setOngoing(true)

View File

@ -3,9 +3,10 @@
<string name="app_name">bitchat</string>
<string name="mesh_channel_name">Mesh network</string>
<string name="mesh_channel_description">Keeps the Bluetooth mesh running in the background</string>
<string name="mesh_notification_no_peers">Mesh running</string>
<plurals name="mesh_notification_text">
<item quantity="one">Mesh running — %1$d peer</item>
<item quantity="other">Mesh running — %1$d peers</item>
<item quantity="one">%1$d peer</item>
<item quantity="other">%1$d peers</item>
</plurals>
<string name="message_channel_name">Direct messages</string>
<string name="message_channel_description">Encrypted direct-message alerts</string>