Loading app/src/main/java/io/heckel/ntfy/util/Util.kt +4 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,10 @@ fun String.readBitmapFromUriOrNull(context: Context): Bitmap? { } } fun Long.nullIfZero(): Long? { return if (this == 0L) return null else this } // TextWatcher that only implements the afterTextChanged method class AfterChangedTextWatcher(val afterTextChangedFn: (s: Editable?) -> Unit) : TextWatcher { override fun afterTextChanged(s: Editable?) { Loading app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt +3 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import io.heckel.ntfy.msg.ApiService import io.heckel.ntfy.msg.NotificationDispatcher import io.heckel.ntfy.msg.NotificationParser import io.heckel.ntfy.service.SubscriberService import io.heckel.ntfy.util.nullIfZero import io.heckel.ntfy.util.toPriority import io.heckel.ntfy.util.topicShortUrl import io.heckel.ntfy.work.PollWorker Loading Loading @@ -94,8 +95,8 @@ class FirebaseService : FirebaseMessagingService() { val encoding = data["encoding"] val attachmentName = data["attachment_name"] ?: "attachment.bin" val attachmentType = data["attachment_type"] val attachmentSize = data["attachment_size"]?.toLongOrNull() val attachmentExpires = data["attachment_expires"]?.toLongOrNull() val attachmentSize = data["attachment_size"]?.toLongOrNull()?.nullIfZero() val attachmentExpires = data["attachment_expires"]?.toLongOrNull()?.nullIfZero() val attachmentUrl = data["attachment_url"] val truncated = (data["truncated"] ?: "") == "1" if (id == null || topic == null || message == null || timestamp == null) { Loading fastlane/metadata/android/en-US/changelog/29.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ Bug fixes + maintenance: * Fix topics do not re-subscribe to Firebase after restoring from backup (#511) * Fix crashes from large images (#474, thanks to @daedric7 for reporting) * Fix notification click opens wrong subscription (#261, thanks to @SMAW for reporting) * Fix Firebase-only "link expired" issue (#529) * Add donate button (no ticket) Additional translations: Loading Loading
app/src/main/java/io/heckel/ntfy/util/Util.kt +4 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,10 @@ fun String.readBitmapFromUriOrNull(context: Context): Bitmap? { } } fun Long.nullIfZero(): Long? { return if (this == 0L) return null else this } // TextWatcher that only implements the afterTextChanged method class AfterChangedTextWatcher(val afterTextChangedFn: (s: Editable?) -> Unit) : TextWatcher { override fun afterTextChanged(s: Editable?) { Loading
app/src/play/java/io/heckel/ntfy/firebase/FirebaseService.kt +3 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ import io.heckel.ntfy.msg.ApiService import io.heckel.ntfy.msg.NotificationDispatcher import io.heckel.ntfy.msg.NotificationParser import io.heckel.ntfy.service.SubscriberService import io.heckel.ntfy.util.nullIfZero import io.heckel.ntfy.util.toPriority import io.heckel.ntfy.util.topicShortUrl import io.heckel.ntfy.work.PollWorker Loading Loading @@ -94,8 +95,8 @@ class FirebaseService : FirebaseMessagingService() { val encoding = data["encoding"] val attachmentName = data["attachment_name"] ?: "attachment.bin" val attachmentType = data["attachment_type"] val attachmentSize = data["attachment_size"]?.toLongOrNull() val attachmentExpires = data["attachment_expires"]?.toLongOrNull() val attachmentSize = data["attachment_size"]?.toLongOrNull()?.nullIfZero() val attachmentExpires = data["attachment_expires"]?.toLongOrNull()?.nullIfZero() val attachmentUrl = data["attachment_url"] val truncated = (data["truncated"] ?: "") == "1" if (id == null || topic == null || message == null || timestamp == null) { Loading
fastlane/metadata/android/en-US/changelog/29.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ Bug fixes + maintenance: * Fix topics do not re-subscribe to Firebase after restoring from backup (#511) * Fix crashes from large images (#474, thanks to @daedric7 for reporting) * Fix notification click opens wrong subscription (#261, thanks to @SMAW for reporting) * Fix Firebase-only "link expired" issue (#529) * Add donate button (no ticket) Additional translations: Loading