File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/fragments/detail Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import org .schabi .newpipe .util .Localization ;
2121
2222import java .util .List ;
23- import java .util .Optional ;
2423
2524public class DescriptionFragment extends BaseDescriptionFragment {
2625
@@ -68,13 +67,12 @@ public List<String> getTags() {
6867 @ Override
6968 protected void setupMetadata (final LayoutInflater inflater ,
7069 final LinearLayout layout ) {
71- Optional .ofNullable (streamInfo )
72- .map (StreamInfo ::getUploadDate )
73- .ifPresentOrElse (
74- wrapper -> binding .detailUploadDateView
75- .setText (Localization .formatDate (wrapper .offsetDateTime ())),
76- () -> binding .detailUploadDateView .setVisibility (View .GONE )
77- );
70+ final var date = streamInfo != null ? streamInfo .getUploadDate () : null ;
71+ if (date != null ) {
72+ binding .detailUploadDateView .setText (Localization .formatDate (date .offsetDateTime ()));
73+ } else {
74+ binding .detailUploadDateView .setVisibility (View .GONE );
75+ }
7876
7977 if (streamInfo == null ) {
8078 return ;
You can’t perform that action at this time.
0 commit comments