mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 17:48:52 -06:00
Update widgets at midnight (#634)
This commit is contained in:
@@ -164,6 +164,8 @@ public class ReminderScheduler implements CommandRunner.Listener
|
||||
{
|
||||
void scheduleShowReminder(long reminderTime, Habit habit, long timestamp);
|
||||
|
||||
void scheduleWidgetUpdate(long updateTime);
|
||||
|
||||
void log(String componentName, String msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,9 +175,14 @@ public abstract class DateUtils
|
||||
return getStartOfDay(getLocalTime());
|
||||
}
|
||||
|
||||
public static long getStartOfTomorrow()
|
||||
{
|
||||
return getUpcomingTimeInMillis(0, 0);
|
||||
}
|
||||
|
||||
public static long millisecondsUntilTomorrow()
|
||||
{
|
||||
return getStartOfToday() + DAY_LENGTH - getLocalTime();
|
||||
return getStartOfTomorrow() - getLocalTime();
|
||||
}
|
||||
|
||||
public static GregorianCalendar getStartOfTodayCalendar()
|
||||
|
||||
Reference in New Issue
Block a user