mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Crash on share no expiration date or field returned from api (#199)
This commit is contained in:
commit
576c93e6cb
2 changed files with 5 additions and 0 deletions
|
|
@ -105,7 +105,11 @@ public class UIUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getReadableDate(Date date) {
|
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());
|
SimpleDateFormat formatter = new SimpleDateFormat("dd MMM, yyyy", Locale.getDefault());
|
||||||
return formatter.format(date);
|
return formatter.format(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -409,6 +409,7 @@
|
||||||
<string name="share_bottom_sheet_delete">Delete share</string>
|
<string name="share_bottom_sheet_delete">Delete share</string>
|
||||||
<string name="share_bottom_sheet_update">Update share</string>
|
<string name="share_bottom_sheet_update">Update share</string>
|
||||||
<string name="share_subtitle_item">Expiration date: %1$s</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="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_clipboard_label">Tempus asset link</string>
|
||||||
<string name="asset_link_label_song">Song UID</string>
|
<string name="asset_link_label_song">Song UID</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue