Use ITEM_COUNT_UNKNOWN
This commit is contained in:
parent
914d3c4a66
commit
63e489f134
|
@ -136,7 +136,7 @@ dependencies {
|
||||||
exclude module: 'support-annotations'
|
exclude module: 'support-annotations'
|
||||||
})
|
})
|
||||||
|
|
||||||
implementation 'com.github.XiangRongLin:NewPipeExtractor:f9a084f8f9611a87d0f8d6f309a40429304b2ac9'
|
implementation 'com.github.XiangRongLin:NewPipeExtractor:34073527498a22e1f7c1feb18132bf62fb544825'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
testImplementation 'org.mockito:mockito-core:2.23.0'
|
testImplementation 'org.mockito:mockito-core:2.23.0'
|
||||||
|
|
||||||
|
|
|
@ -155,10 +155,12 @@ public final class Localization {
|
||||||
|
|
||||||
public static String localizeStreamCount(final Context context, final long streamCount) {
|
public static String localizeStreamCount(final Context context, final long streamCount) {
|
||||||
switch ((int) streamCount) {
|
switch ((int) streamCount) {
|
||||||
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
|
||||||
return context.getResources().getString(R.string.more_than_100_videos);
|
return "";
|
||||||
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
||||||
return context.getResources().getString(R.string.infinite_videos);
|
return context.getResources().getString(R.string.infinite_videos);
|
||||||
|
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
||||||
|
return context.getResources().getString(R.string.more_than_100_videos);
|
||||||
default:
|
default:
|
||||||
return getQuantity(context, R.plurals.videos, R.string.no_videos, streamCount,
|
return getQuantity(context, R.plurals.videos, R.string.no_videos, streamCount,
|
||||||
localizeNumber(context, streamCount));
|
localizeNumber(context, streamCount));
|
||||||
|
@ -167,10 +169,12 @@ public final class Localization {
|
||||||
|
|
||||||
public static String localizeStreamCountMini(final Context context, final long streamCount) {
|
public static String localizeStreamCountMini(final Context context, final long streamCount) {
|
||||||
switch ((int) streamCount) {
|
switch ((int) streamCount) {
|
||||||
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
|
||||||
return context.getResources().getString(R.string.more_than_100_videos_mini);
|
return "";
|
||||||
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
case (int) ListExtractor.ITEM_COUNT_INFINITE:
|
||||||
return context.getResources().getString(R.string.infinite_videos_mini);
|
return context.getResources().getString(R.string.infinite_videos_mini);
|
||||||
|
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
|
||||||
|
return context.getResources().getString(R.string.more_than_100_videos_mini);
|
||||||
default:
|
default:
|
||||||
return String.valueOf(streamCount);
|
return String.valueOf(streamCount);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue