summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-23 20:16:56 -0800
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-12-23 20:16:56 -0800
commit3ffaa53c90552d7fe311aa190ca07dc7d60b225f (patch)
tree5d3fb954f3a0322857ccf21cb9f1cbf7d97f1a00
parentf40a33d9b0ae81715f720a7569621de62da7d267 (diff)
parent8abd9474a9bb81f3c762a286ee805ff7e987931c (diff)
downloadair_mediahub-3ffaa53c90552d7fe311aa190ca07dc7d60b225f.tar.gz
air_mediahub-3ffaa53c90552d7fe311aa190ca07dc7d60b225f.tar.bz2
air_mediahub-3ffaa53c90552d7fe311aa190ca07dc7d60b225f.zip
Merge "movie: update recently watched item for UPDATE_BACK type" into tizensubmit/tizen/20151224.041445accepted/tizen/tv/20151224.064325
-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;