From 2b47a1b06ab7378f0c28838cdce78e2108ce3b67 Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 20 Mar 2020 21:22:09 +0100 Subject: [PATCH] Also use localizeStreamCount() in local items --- .../schabi/newpipe/local/holder/LocalPlaylistItemHolder.java | 4 +++- .../schabi/newpipe/local/holder/RemotePlaylistItemHolder.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java index 3ff4f707a..a3d72094d 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/LocalPlaylistItemHolder.java @@ -8,6 +8,7 @@ import org.schabi.newpipe.database.playlist.PlaylistMetadataEntry; import org.schabi.newpipe.local.LocalItemBuilder; import org.schabi.newpipe.local.history.HistoryRecordManager; import org.schabi.newpipe.util.ImageDisplayConstants; +import org.schabi.newpipe.util.Localization; import java.text.DateFormat; @@ -31,7 +32,8 @@ public class LocalPlaylistItemHolder extends PlaylistItemHolder { final PlaylistMetadataEntry item = (PlaylistMetadataEntry) localItem; itemTitleView.setText(item.name); - itemStreamCountView.setText(String.valueOf(item.streamCount)); + itemStreamCountView.setText(Localization.localizeStreamCount(itemStreamCountView.getContext(), + item.streamCount)); itemUploaderView.setVisibility(View.INVISIBLE); itemBuilder.displayImage(item.thumbnailUrl, itemThumbnailView, diff --git a/app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java b/app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java index c6d387fd4..015173842 100644 --- a/app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/local/holder/RemotePlaylistItemHolder.java @@ -34,7 +34,8 @@ public class RemotePlaylistItemHolder extends PlaylistItemHolder { final PlaylistRemoteEntity item = (PlaylistRemoteEntity) localItem; itemTitleView.setText(item.getName()); - itemStreamCountView.setText(String.valueOf(item.getStreamCount())); + itemStreamCountView.setText(Localization.localizeStreamCount(itemStreamCountView.getContext(), + item.getStreamCount())); // Here is where the uploader name is set in the bookmarked playlists library if (!TextUtils.isEmpty(item.getUploader())) { itemUploaderView.setText(Localization.concatenateStrings(item.getUploader(),