package com.maxiee.heartbeat.data;

import android.content.Context;

import com.maxiee.heartbeat.database.utils.EventUtils;
import com.maxiee.heartbeat.database.utils.ThoughtUtils;

import java.util.ArrayList;

/**
 * Created by maxiee on 15/11/10.
 */
public class TodayManager extends BaseEventManager{

    public TodayManager(Context context) {
        super(context);
        mEventList = new ArrayList<>();
        reload();
    }

    @Override
    void reload() {
        if (mEventList != null) mEventList.clear();
        mEventList.addAll(EventUtils.getToday(mContext));
    }

    public int countTodayThought() {
        return ThoughtUtils.getTodayCount(mContext);
    }

    public int countTodayEvent() {
       return mEventList.size();
    }
}

@@ -173,16 +173,57 @@
 htUtils;
+%0Aimport com.maxiee.heartbeat.model.Event;
 %0A%0Aimport
@@ -615,32 +615,189 @@
 ntext));%0A    %7D%0A%0A
+    @Override%0A    public void addEvent(Event event) %7B%0A        reload();%0A    %7D%0A%0A    @Override%0A    public void updateEvent(Event e) %7B%0A        reload();%0A    %7D%0A%0A
     public int c

add and update now just reload.