Also use localizeStreamCount() in local items

This commit is contained in:
Stypox 2020-03-20 21:22:09 +01:00 committed by wb9688
parent 625419a7db
commit 2b47a1b06a
2 changed files with 5 additions and 2 deletions

View File

@ -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,

View File

@ -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(),