mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2025-12-24 00:18:02 -05:00
fix: further eliminate the use of HTML decode in titles and subtitles
This commit is contained in:
@@ -40,7 +40,7 @@ public class ShareHorizontalAdapter extends RecyclerView.Adapter<ShareHorizontal
|
||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||
Share share = shares.get(position);
|
||||
|
||||
holder.item.shareTitleTextView.setText(MusicUtil.getReadableString(share.getDescription()));
|
||||
holder.item.shareTitleTextView.setText(share.getDescription());
|
||||
holder.item.shareSubtitleTextView.setText(holder.itemView.getContext().getString(R.string.share_subtitle_item, UIUtil.getReadableDate(share.getExpires())));
|
||||
|
||||
if (share.getEntries() != null && !share.getEntries().isEmpty()) CustomGlideRequest.Builder
|
||||
|
||||
@@ -182,7 +182,7 @@ public class AlbumPageFragment extends Fragment implements ClickCallback {
|
||||
if (albumInfo != null) {
|
||||
if (bind != null) bind.albumNotesTextview.setVisibility(View.VISIBLE);
|
||||
if (bind != null)
|
||||
bind.albumNotesTextview.setText(MusicUtil.getReadableString(albumInfo.getNotes()));
|
||||
bind.albumNotesTextview.setText(MusicUtil.forceReadableString(albumInfo.getNotes()));
|
||||
|
||||
if (bind != null && albumInfo.getLastFmUrl() != null && !albumInfo.getLastFmUrl().isEmpty()) {
|
||||
bind.albumNotesTextview.setOnClickListener(v -> {
|
||||
|
||||
@@ -179,14 +179,6 @@ public class MusicUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getReadableString(String string) {
|
||||
if (string != null) {
|
||||
return Html.fromHtml(string, Html.FROM_HTML_MODE_COMPACT).toString();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getReadableTrackNumber(Context context, Integer trackNumber) {
|
||||
if (trackNumber != null) {
|
||||
return String.valueOf(trackNumber);
|
||||
@@ -195,6 +187,14 @@ public class MusicUtil {
|
||||
return context.getString(R.string.label_placeholder);
|
||||
}
|
||||
|
||||
public static String getReadableString(String string) {
|
||||
if (string != null) {
|
||||
return Html.fromHtml(string, Html.FROM_HTML_MODE_COMPACT).toString();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String forceReadableString(String string) {
|
||||
if (string != null) {
|
||||
return getReadableString(string)
|
||||
|
||||
Reference in New Issue
Block a user