summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-12-24 10:54:19 +0900
committerJehun Lim <jehun.lim@samsung.com>2015-12-24 10:54:19 +0900
commit8abd9474a9bb81f3c762a286ee805ff7e987931c (patch)
treef2a42c4c6cf3ea89bad8c64a08d73f9a96c91524
parent8c5e2c58c9c2d346370a86f2dab9165d6ad28b53 (diff)
downloadair_mediahub-8abd9474a9bb81f3c762a286ee805ff7e987931c.tar.gz
air_mediahub-8abd9474a9bb81f3c762a286ee805ff7e987931c.tar.bz2
air_mediahub-8abd9474a9bb81f3c762a286ee805ff7e987931c.zip
movie: update recently watched item for UPDATE_BACK type
Change-Id: I0aff6afff1bb8134093c6573d8c9a8e9d3193426 Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r--src/layout/movie.c8
-rw-r--r--src/view/base.c2
-rw-r--r--src/view/detail.c17
3 files changed, 23 insertions, 4 deletions
diff --git a/src/layout/movie.c b/src/layout/movie.c
index d242db9..2159412 100644
--- a/src/layout/movie.c
+++ b/src/layout/movie.c
@@ -697,6 +697,14 @@ static void _update(void *layout_data, int update_type, void *data)
listmgr_focus_play_info(priv->listmgr);
break;
case UPDATE_BACK:
+ if (!data) {
+ _ERR("invalid argument");
+ return;
+ }
+
+ vdata = data;
+
+ _update_recent_item(priv, vdata->id);
listmgr_focus_content_list(priv->listmgr, NULL);
break;
case UPDATE_RECENT:
diff --git a/src/view/base.c b/src/view/base.c
index f4e21d8..b44b498 100644
--- a/src/view/base.c
+++ b/src/view/base.c
@@ -991,6 +991,7 @@ static void _update(void *view_data, int update_type, void *data)
switch (update_type) {
case UPDATE_FOCUS:
+ case UPDATE_BACK:
if (!data)
goto err;
@@ -1012,7 +1013,6 @@ static void _update(void *view_data, int update_type, void *data)
update_type, vdata);
break;
case UPDATE_CONTENT_ITEM:
- case UPDATE_BACK:
layoutmgr_update_layout(priv->lmgr,
g_menu_item[priv->current_layout].layout_id,
update_type, NULL);
diff --git a/src/view/detail.c b/src/view/detail.c
index d7d4839..836b528 100644
--- a/src/view/detail.c
+++ b/src/view/detail.c
@@ -179,9 +179,20 @@ static void _update_view(struct _priv *priv)
free(linfo);
}
-static void _pop_view(void)
+static void _pop_view(struct _priv *priv)
{
- viewmgr_update_view(VIEW_BASE, UPDATE_BACK, NULL);
+ struct view_update_data vdata;
+ app_media_info *mi;
+
+ vdata.id = NULL;
+
+ if (view_info[priv->view_type].app_contents_type != CONTENTS_GALLERY) {
+ mi = app_media_get_info(priv->play_info);
+ vdata.id = mi->media_id;
+ }
+
+ viewmgr_update_view(VIEW_BASE, UPDATE_BACK, &vdata);
+
viewmgr_pop_view();
}
@@ -204,7 +215,7 @@ static void _key_down_cb(int id, void *data, Evas *e, Evas_Object *obj,
if (priv->depth > 0)
_update_view(priv);
else
- _pop_view();
+ _pop_view(priv);
}
break;