diff --git a/app/build.gradle b/app/build.gradle
index 99c25d80..cb7439de 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -25,7 +25,7 @@ android {
def date = new Date().format('ddMMyy_HHmmss')
archivesBaseName = archivesBaseName + "-$date"
// Disable fabric build ID generation for debug builds
- ext.enableCrashlytics = false;
+ ext.enableCrashlytics = false
}
}
@@ -58,7 +58,7 @@ dependencies {
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
- implementation 'com.squareup.okhttp3:okhttp:3.10.0'
+ implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
implementation 'org.jsoup:jsoup:1.10.3' //TODO: Warning: upgrading from 1.10.3 will break stuff!
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index c06e027a..b603ba91 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -26,6 +26,8 @@
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
+# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
+-dontwarn org.codehaus.mojo.animal_sniffer.*
# Picasso
-dontwarn com.squareup.okhttp.**
diff --git a/app/src/main/assets/apache_libraries.html b/app/src/main/assets/apache_libraries.html
index abcdb7d7..a8ff5d90 100644
--- a/app/src/main/assets/apache_libraries.html
+++ b/app/src/main/assets/apache_libraries.html
@@ -39,7 +39,7 @@
-
-
OkHttp v3.10.0 (Copyright ©2016 Square, Inc.)
+ OkHttp v3.11.0 (Copyright ©2016 Square, Inc.)
-
Picasso v2.5.2 (Copyright ©2013 Square, Inc.)
diff --git a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java
index d2d9f73c..39e34062 100644
--- a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java
+++ b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java
@@ -156,7 +156,7 @@ public class NotificationService extends FirebaseMessagingService {
int k1 = postNotification.getTopicId();
int k2 = postNotification.getBoardId();
notificationId = -(((k1+k2)*(k1+k2+1))/2+k2);
- contentText = "New post in " + postNotification.getTopicTitle();
+ contentText = "New post in \"" + postNotification.getTopicTitle() + "\"";
}
int newPostsCount = 1;
@@ -221,16 +221,17 @@ public class NotificationService extends FirebaseMessagingService {
.setGroup(GROUP_KEY)
.setAutoCancel(true)
.setStyle(new NotificationCompat.InboxStyle()
- .setSummaryText("New Posts"))
+ .setSummaryText("New Posts"))
.setDefaults(Notification.DEFAULT_ALL);
}
-
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
// Since Android Oreo notification channel is needed.
- if (buildVersion >= Build.VERSION_CODES.O)
- notificationManager.createNotificationChannel(new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH));
+ if (buildVersion >= Build.VERSION_CODES.O){
+ if (notificationManager.getNotificationChannel(CHANNEL_ID) == null)
+ notificationManager.createNotificationChannel(new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_HIGH));
+ }
notificationManager.notify(NEW_POST_TAG, notificationId, notificationBuilder.build());