From ac674d937a8d690336deeabed0a0a3f90f3ac480 Mon Sep 17 00:00:00 2001 From: eddyizm Date: Mon, 27 Oct 2025 20:47:46 -0700 Subject: [PATCH] fix: handle null or no expiry field being sent back from server --- app/src/main/java/com/cappielloantonio/tempo/util/UIUtil.java | 4 ++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/com/cappielloantonio/tempo/util/UIUtil.java b/app/src/main/java/com/cappielloantonio/tempo/util/UIUtil.java index f9b7fdba..2184c10a 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/util/UIUtil.java +++ b/app/src/main/java/com/cappielloantonio/tempo/util/UIUtil.java @@ -105,7 +105,11 @@ public class UIUtil { } public static String getReadableDate(Date date) { + if (date == null) { + return App.getContext().getString(R.string.share_no_expiration); + } SimpleDateFormat formatter = new SimpleDateFormat("dd MMM, yyyy", Locale.getDefault()); return formatter.format(date); } + } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 97064202..c5b35a88 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -409,6 +409,7 @@ Delete share Update share Expiration date: %1$s + Never Sharing is not supported or not enabled Tempus asset link Song UID