char *text = NULL;
item = eina_list_nth(timeline_d->data_list, date_item->index);
- int number_of_items_on_particular_date = _get_count_of_items_on_same_date(item, timeline_d->data_list, &text, date_item->index);
+ int number_of_items_on_particular_date = _get_count_of_items_on_same_date(item, timeline_d->data_list, &text, date_item->index + 1);
int i;
- for (i = date_item->index -1; i < (date_item->index -1 +number_of_items_on_particular_date); i++) {
+ for (i = date_item->index; i < (date_item->index +number_of_items_on_particular_date); i++) {
item = eina_list_nth(timeline_d->data_list, i);
if (!item) {
gl_dbgE("item not found ");
gl_media_s *item = NULL;
bool flag = true;
int i;
- for (i = date_item->index -1; i < (date_item->index -1 +number_of_items_on_particular_date); i++) {
+ for (i = date_item->index; i < (date_item->index +number_of_items_on_particular_date); i++) {
item = eina_list_nth(timeline_d->data_list, i);
if (!item) {
gl_dbgE("item not found");
gl_media_s *item = NULL;
char *text = NULL;
item = eina_list_nth(timeline_d->data_list, date_item->index);
- int number_of_items_on_particular_date = _get_count_of_items_on_same_date(item, timeline_d->data_list, &text, date_item->index);
+ int number_of_items_on_particular_date = _get_count_of_items_on_same_date(item, timeline_d->data_list, &text, date_item->index + 1);
bool flag = true;
int i;
- for (i = date_item->index -1; i < (date_item->index -1 +number_of_items_on_particular_date); i++) {
+ for (i = date_item->index; i < (date_item->index +number_of_items_on_particular_date); i++) {
item = eina_list_nth(timeline_d->data_list, i);
if (!item) {
gl_dbgE("item not found");
items_per_row = 4;
}
number_of_rows = ceil((double)number_of_items_on_particular_date / items_per_row);
- date_item->index = i+1;
+ date_item->index = i;
date_item->check_state = _gl_get_date_check_state(timeline_d, date_item, number_of_items_on_particular_date);
it = elm_genlist_item_append(genlist, pGenGridZoomItc, (void*)date_item, NULL, ELM_GENLIST_ITEM_GROUP, __gl_timeline_date_check_sel_cb, timeline_d);