Crash on share no expiration date or field returned from api (#199)

This commit is contained in:
eddyizm 2025-10-27 20:57:36 -07:00 committed by GitHub
commit 576c93e6cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);
}
}

View file

@ -409,6 +409,7 @@
<string name="share_bottom_sheet_delete">Delete share</string>
<string name="share_bottom_sheet_update">Update share</string>
<string name="share_subtitle_item">Expiration date: %1$s</string>
<string name="share_no_expiration">Never</string>
<string name="share_unsupported_error">Sharing is not supported or not enabled</string>
<string name="asset_link_clipboard_label">Tempus asset link</string>
<string name="asset_link_label_song">Song UID</string>