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

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

Fix yesterday-today separator in agenda

Bug: 6495046 Calendar showed spurious black line between events
Change-Id: Ib340c2fcff65752a905263705381e6d27ed0dc69
parent 30331cc2
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1124,13 +1124,16 @@ public class AgendaWindowAdapter extends BaseAdapter

                // Go over the events and mark the first day after yesterday
                // that has events in it
                // If the range of adapters doesn't include yesterday, skip marking it since it will
                // mark the first day in the adapters.
                synchronized (mAdapterInfos) {
                    DayAdapterInfo info = mAdapterInfos.getFirst();
                    if (info != null) {
                    Time time = new Time(mTimeZone);
                    long now = System.currentTimeMillis();
                    time.set(now);
                    int JulianToday = Time.getJulianDay(now, time.gmtoff);
                    if (info != null && JulianToday >= info.start && JulianToday
                            <= mAdapterInfos.getLast().end) {
                        Iterator<DayAdapterInfo> iter = mAdapterInfos.iterator();
                        boolean foundDay = false;
                        while (iter.hasNext() && !foundDay) {