Skip to content

Commit

Permalink
Fixed medicine notification visual.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyckoka committed May 9, 2024
1 parent 1e41220 commit 82e22ad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,22 @@ class MedicineNotificationsBackgroundService : Service() {
)


val message = getString(
R.string.medicine_notification_text,
notification.medicineStock.medicine.name,
notification.medicineStock.stock,
notification.pharmacy.pharmacyName
)

// Show notification to the user
val notificationCompat = NotificationCompat.Builder(
this@MedicineNotificationsBackgroundService,
PharmacistApplication.MEDICINE_NOTIFICATION_CHANNEL
)
.setSmallIcon(R.drawable.pharmacy_logo)
.setContentTitle(getString(R.string.medicine_notification_title))
.setContentText(
getString(
R.string.medicine_notification_text,
notification.medicineStock.medicine.name,
notification.medicineStock.stock,
notification.pharmacy.pharmacyName
)
)
.setContentTitle(getString(R.string.medicine_notification_title, notification.medicineStock.medicine.name))
.setStyle(NotificationCompat.BigTextStyle().bigText(message))
.setContentText(message)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setContentIntent(pendingNotiIntent)
.setAutoCancel(true)
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<string name="about_githubLogo_contentDescription">Logo de Github</string>
<string name="about_emailIcon_contentDescription">Ícono de email</string>

<string name="medicine_notification_title">Título de Notificación de Medicamentos</string>
<string name="medicine_notification_text">Nuevo Medicamento %1$s con %2$d de cantidad disponible en %3$s</string>
<string name="medicine_notification_title">Medicamento %1$s en stock!</string>
<string name="medicine_notification_text">Medicamento %1$s con %2$d de cantidad disponible en %3$s</string>
<string name="pharmacy_map_camera_permission_title">Se Requiere Permiso de Cámara</string>
<string name="pharmacyMap_location_permission_note">La aplicación necesita tanto la ubicación aproximada como precisa para todas las funciones. Como anteriormente negaste estos ajustes, debes ir a los ajustes de permisos y permitirlos.</string>
<string name="pharmacyMap_camera_permission_note">Para tomar o subir una foto, necesitas otorgar el permiso de cámara y el permiso de almacenamiento.</string>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<string name="about_githubLogo_contentDescription">Logo do Github</string>
<string name="about_emailIcon_contentDescription">Ícone de email</string>

<string name="medicine_notification_title">Título da Notificação de Medicamentos</string>
<string name="medicine_notification_text">Novo Medicamento %1$s com %2$d de quantidade disponível em %3$s</string>
<string name="medicine_notification_title">Medicamento %1$s em estoque!</string>
<string name="medicine_notification_text">Medicamento %1$s com %2$d de quantidade disponível em %3$s</string>
<string name="pharmacy_map_camera_permission_title">Permissão de Câmera Necessária</string>
<string name="pharmacyMap_location_permission_note">O aplicativo precisa de localização aproximada e precisa para recursos completos. Como você negou essas configurações anteriormente, é necessário ir às configurações de permissão e permiti-las.</string>
<string name="pharmacyMap_camera_permission_note">Para tirar ou enviar uma foto, você precisa conceder permissão de câmera e permissão de armazenamento.</string>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<!-- Medicine Notification -->
<string name="medicines_notification_channel_name" translatable="false">Pharmacist</string>
<string name="medicines_notification_channel_description" translatable="false">Nothing\n</string>
<string name="medicine_notification_title">Medicines Notification Title</string>
<string name="medicine_notification_text">New Medicine %1$s with %2$d quantity available in %3$s</string>
<string name="medicine_notification_title">Medicine %1$s in stock!</string>
<string name="medicine_notification_text">Medicine %1$s with %2$d quantity available in %3$s</string>
<string name="pharmacy_map_camera_permission_title">Camera Permission Required</string>
<string name="pharmacyMap_location_permission_note">App needs both approximate &amp; precise location for full features. Since you previously denied these settings, you must go to the permission settings and allow them.</string>
<string name="pharmacyMap_camera_permission_note">To take or upload a photo, you need to grant the camera permission and storage permission.</string>
Expand Down

0 comments on commit 82e22ad

Please sign in to comment.