1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-21 23:32:51 +00:00

Fixed selecting messages of a week

This commit is contained in:
M66B 2024-11-22 07:10:35 +01:00
parent 3fbff12889
commit d30538ae13

View file

@ -1230,7 +1230,13 @@ public class FragmentMessages extends FragmentBase
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
cal.add(Calendar.DATE, 1);
if (date_week) {
cal.setMinimalDaysInFirstWeek(4); // ISO 8601
cal.setFirstDayOfWeek(Calendar.MONDAY);
cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
cal.add(Calendar.DATE, 7);
} else
cal.add(Calendar.DATE, 1);
long to = cal.getTimeInMillis();
cal.add(Calendar.DATE, date_week ? -7 : -1);