fix: handle null or no expiry field being sent back from server

This commit is contained in:
eddyizm 2025-10-27 20:47:46 -07:00
parent 0ed329022e
commit ac674d937a
No known key found for this signature in database
GPG key ID: CF5F671829E8158A
2 changed files with 5 additions and 0 deletions

View file

@ -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);
}
}