Fix queue changing
This commit is contained in:
parent
69c76556a2
commit
891f1bce34
34 changed files with 1007 additions and 132 deletions
|
@ -91,7 +91,7 @@ public class CalendarUtil {
|
|||
year--;
|
||||
}
|
||||
|
||||
elapsed += getDaysInMonth(year, month) * MS_PER_DAY;
|
||||
elapsed += getDaysInMonth(month) * MS_PER_DAY;
|
||||
}
|
||||
|
||||
return elapsed;
|
||||
|
@ -109,7 +109,7 @@ public class CalendarUtil {
|
|||
int month = calendar.get(Calendar.MONTH) - 1;
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
while (month > Calendar.JANUARY) {
|
||||
elapsed += getDaysInMonth(year, month) * MS_PER_DAY;
|
||||
elapsed += getDaysInMonth(month) * MS_PER_DAY;
|
||||
|
||||
month--;
|
||||
}
|
||||
|
@ -120,11 +120,10 @@ public class CalendarUtil {
|
|||
/**
|
||||
* Gets the number of days for the given month in the given year.
|
||||
*
|
||||
* @param year The year.
|
||||
* @param month The month (1 - 12).
|
||||
* @return The days in that month/year.
|
||||
*/
|
||||
private int getDaysInMonth(int year, int month) {
|
||||
private int getDaysInMonth(int month) {
|
||||
final Calendar monthCal = new GregorianCalendar(calendar.get(Calendar.YEAR), month, 1);
|
||||
return monthCal.getActualMaximum(Calendar.DAY_OF_MONTH);
|
||||
}
|
||||
|
|
|
@ -373,8 +373,8 @@ public class MusicUtil {
|
|||
if (artistName.equals(Artist.UNKNOWN_ARTIST_DISPLAY_NAME)) {
|
||||
return true;
|
||||
}
|
||||
artistName = artistName.trim().toLowerCase();
|
||||
return artistName.equals("unknown") || artistName.equals("<unknown>");
|
||||
String tempName = artistName.trim().toLowerCase();
|
||||
return tempName.equals("unknown") || tempName.equals("<unknown>");
|
||||
}
|
||||
|
||||
public static boolean isFavorite(@NonNull final Context context, @NonNull final Song song) {
|
||||
|
|
|
@ -194,10 +194,11 @@ public class RetroColorUtil {
|
|||
|
||||
@ColorInt
|
||||
public static int shiftBackgroundColorForDarkText(@ColorInt int backgroundColor) {
|
||||
int color = backgroundColor;
|
||||
while (!ColorUtil.INSTANCE.isColorLight(backgroundColor)) {
|
||||
backgroundColor = ColorUtil.INSTANCE.lightenColor(backgroundColor);
|
||||
color = ColorUtil.INSTANCE.lightenColor(backgroundColor);
|
||||
}
|
||||
return backgroundColor;
|
||||
return color;
|
||||
}
|
||||
|
||||
private static class SwatchComparator implements Comparator<Palette.Swatch> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue