mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Made the due distinction based on the server on the most listened to songs of the week
This commit is contained in:
parent
5eed437c5b
commit
1204716a65
6 changed files with 29 additions and 14 deletions
|
|
@ -21,7 +21,7 @@ public class ChronologyRepository {
|
|||
chronologyDao = database.chronologyDao();
|
||||
}
|
||||
|
||||
public LiveData<List<Chronology>> getThisWeek() {
|
||||
public LiveData<List<Chronology>> getThisWeek(String server) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
Calendar first = (Calendar) calendar.clone();
|
||||
|
|
@ -30,10 +30,10 @@ public class ChronologyRepository {
|
|||
Calendar last = (Calendar) first.clone();
|
||||
last.add(Calendar.DAY_OF_YEAR, 6);
|
||||
|
||||
return chronologyDao.getAllFrom(first.getTime().getTime(), last.getTime().getTime());
|
||||
return chronologyDao.getAllFrom(first.getTime().getTime(), last.getTime().getTime(), server);
|
||||
}
|
||||
|
||||
public LiveData<List<Chronology>> getLastWeek() {
|
||||
public LiveData<List<Chronology>> getLastWeek(String server) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
Calendar first = (Calendar) calendar.clone();
|
||||
|
|
@ -42,7 +42,7 @@ public class ChronologyRepository {
|
|||
Calendar last = (Calendar) first.clone();
|
||||
last.add(Calendar.DAY_OF_YEAR, 6);
|
||||
|
||||
return chronologyDao.getAllFrom(first.getTime().getTime(), last.getTime().getTime());
|
||||
return chronologyDao.getAllFrom(first.getTime().getTime(), last.getTime().getTime(), server);
|
||||
}
|
||||
|
||||
public void insert(Chronology item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue