mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
fix: handle null or no expiry field being sent back from server
This commit is contained in:
parent
0ed329022e
commit
ac674d937a
2 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue