Added a sleep timer

This commit is contained in:
Karim Abou Zeid 2015-07-08 01:16:19 +02:00
commit 4d82b91465
25 changed files with 350 additions and 47 deletions

View file

@ -20,7 +20,7 @@ public class LastAddedLoader {
public static Cursor makeLastAddedCursor(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 = PreferenceUtils.getInstance(context).getLastAddedCutOff() / 1000;
long cutoff = PreferenceUtils.getInstance(context).getLastAddedCutOffTimestamp() / 1000;
if (cutoff < fourWeeksAgo) {
cutoff = fourWeeksAgo;
}