Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e692869c authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Fix start time for multi-day events in agenda view

Bug: 5720716 Date header showing wrong date when there are
multi-day all-day events

Change-Id: I5e86384f135573b03a1b8854b74ad764f5c19d84
parent b19d2b5e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.graphics.Typeface;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.text.format.Time;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -304,6 +305,10 @@ public class AgendaByDayAdapter extends BaseAdapter {
            }
            // Skip over the days outside of the adapter's range
            startDay = Math.max(startDay, dayAdapterInfo.start);
            // Make sure event's start time is not before the start of the day
            // (setJulianDay sets the time to 12:00am)
            long adapterStartTime = tempTime.setJulianDay(startDay);
            startTime = Math.max(startTime, adapterStartTime);

            if (startDay != prevStartDay) {
                // Check if we skipped over any empty days