mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
fix: set placeholder if track number is null
This commit is contained in:
parent
db76494525
commit
17345372a2
2 changed files with 10 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import android.text.Html;
|
|||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.tempo.App;
|
||||
import com.cappielloantonio.tempo.R;
|
||||
import com.cappielloantonio.tempo.subsonic.models.Child;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -122,6 +123,14 @@ public class MusicUtil {
|
|||
return "";
|
||||
}
|
||||
|
||||
public static String getReadableTrackNumber(Context context, Integer trackNumber) {
|
||||
if (trackNumber != null) {
|
||||
return String.valueOf(trackNumber);
|
||||
}
|
||||
|
||||
return context.getString(R.string.label_placeholder);
|
||||
}
|
||||
|
||||
public static String forceReadableString(String string) {
|
||||
if (string != null) {
|
||||
return getReadableString(string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue