Add last added playlist interval preference (#107)

This commit is contained in:
Eugene Cheung 2017-06-01 14:39:36 -04:00
commit c20262eb03
9 changed files with 175 additions and 18 deletions

View file

@ -18,12 +18,7 @@ public class LastAddedLoader {
}
public static Cursor makeLastAddedCursor(@NonNull final Context context) {
long fourWeeksAgo = (System.currentTimeMillis() / 1000) - (4 * 3600 * 24 * 7);
// possible saved timestamp caused by user "clearing" the last added playlist
long cutoff = PreferenceUtil.getInstance(context).getLastAddedCutOffTimestamp() / 1000;
if (cutoff < fourWeeksAgo) {
cutoff = fourWeeksAgo;
}
long cutoff = PreferenceUtil.getInstance(context).getLastAddedCutoff();
return SongLoader.makeSongCursor(
context,