Skip to content

Commit

Permalink
Update to v1.0.1
Browse files Browse the repository at this point in the history
- Fix push notification crashing the application when opening
- Add marginEnd to notification text next to "New" label so they don't collide
  • Loading branch information
Raf committed May 29, 2022
1 parent 4dfb907 commit f229306
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
applicationId "gr.ihu.iee.aboard.android"
minSdkVersion 23
targetSdkVersion 32
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.0.1"
resConfigs "en", "gr"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
notificationManager.createNotificationChannel(notificationChannel)
}

val id: Long = remoteMessage.data["id"]?.toLong() ?: -1
val id: String = remoteMessage.data["id"] ?: "-"
val title: String = remoteMessage.data["title"] ?: "-"
val tag: String = remoteMessage.data["tag"] ?: "-"
val author: String = remoteMessage.data["author"] ?: "-"
Expand All @@ -71,7 +71,7 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
.setDefaults(Notification.DEFAULT_LIGHTS or Notification.DEFAULT_SOUND or Notification.DEFAULT_VIBRATE)

val args = Bundle()
args.putLong("id", id)
args.putString("id", id)
args.putString("title", tag)

val pendingIntent: PendingIntent = NavDeepLinkBuilder(applicationContext)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/item_notification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:fontFamily="@font/open_sans"
android:textColor="?android:attr/textColorPrimary"
Expand All @@ -35,6 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:ellipsize="end"
android:fontFamily="@font/open_sans_italic"
Expand Down

0 comments on commit f229306

Please sign in to comment.