mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-05 08:52:15 +00:00
Cleaned up a few comments and fixed some plurals logic
This commit is contained in:
@@ -521,9 +521,9 @@ public class DefaultMessageNotifier implements MessageNotifier {
|
||||
|
||||
// If we received some manner of notification but Session is locked..
|
||||
} else if (KeyCachingService.isLocked(context)) {
|
||||
// Note: We provide 0 because `messageNewYouveGot` is now a plurals string and we don't have a count yet, so just
|
||||
// giving it zero will result in "You got a new message".
|
||||
body = SpanUtil.italic(context.getResources().getQuantityString(R.plurals.messageNewYouveGot, 0, 0));
|
||||
// Note: We provide 1 because `messageNewYouveGot` is now a plurals string and we don't have a count yet, so just
|
||||
// giving it 1 will result in "You got a new message".
|
||||
body = SpanUtil.italic(context.getResources().getQuantityString(R.plurals.messageNewYouveGot, 1, 1));
|
||||
|
||||
// ----- All further cases assume we know the contact and that Session isn't locked -----
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ class PushReceiver @Inject constructor(@ApplicationContext val context: Context)
|
||||
.setColor(context.getColor(R.color.textsecure_primary))
|
||||
.setContentTitle(getString(context, R.string.sessionMessenger))
|
||||
|
||||
// Note: We set the count to zero in the below plurals string so it says "You've got a new message" (singular)
|
||||
.setContentText(context.resources.getQuantityString(R.plurals.messageNewYouveGot, 0, 0))
|
||||
// Note: We set the count to 1 in the below plurals string so it says "You've got a new message" (singular)
|
||||
.setContentText(context.resources.getQuantityString(R.plurals.messageNewYouveGot, 1, 1))
|
||||
|
||||
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
|
||||
.setAutoCancel(true)
|
||||
|
||||
Reference in New Issue
Block a user