Fix the issue of group id text is not changed when pressing in emoticon layout 98/171798/5
authorXie Ligang <ligang0.xie@samsung.com>
Wed, 7 Mar 2018 09:38:09 +0000 (17:38 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 8 Mar 2018 05:09:23 +0000 (14:09 +0900)
Change-Id: I74dce97f57945bb845fac1a1ae84e145d4adc528

src/include/ise.h
src/ise.cpp

index a11068b..8cd9db0 100644 (file)
@@ -201,6 +201,7 @@ void ise_app_candidate_show();
 void ise_app_candidate_hide();
 #ifdef _WEARABLE
 void ise_check_wearable_candidate();
+void ise_set_emoticon_label(int group_id);
 #endif
 void ise_reset_context();
 void ise_reset_input_context();
index ba91930..b548dc6 100644 (file)
@@ -1163,10 +1163,7 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
                     if (current_emoticon_group < EMOTICON_GROUP_3)
                         group_id = (emoticon_group_t)(current_emoticon_group + 1);
 
-                    const int BUF_LEN = 16;
-                    char buf[BUF_LEN] = {0};
-                    snprintf(buf, BUF_LEN, "%d/3", group_id);
-                    g_ui->set_private_key("EMOTICON_GROUP_ID", buf, NULL, NULL, 0, const_cast<sclchar*>("EMOTICON_GROUP_NEXT"), TRUE);
+                    ise_set_emoticon_label(group_id);
 #else
                     emoticon_group_t group_id = ise_get_emoticon_group_id(event_desc.key_value);
 #endif
@@ -1472,6 +1469,7 @@ ise_show(int ic)
                     ise_init_emoticon_list();
 #ifdef _WEARABLE
                     current_emoticon_group = EMOTICON_GROUP_1;
+                    ise_set_emoticon_label(1);
 #else
                     if (emoticon_list_recent.size() == 0)
                         current_emoticon_group = EMOTICON_GROUP_1;
@@ -1983,7 +1981,8 @@ ise_app_candidate_hide()
 }
 
 #ifdef _WEARABLE
-void ise_check_wearable_candidate() {
+void ise_check_wearable_candidate()
+{
     if (!g_config_values.prediction_on) {
         ise_app_candidate_hide();
     } else if (g_keyboard_state.layout == ISE_LAYOUT_STYLE_PHONENUMBER ||
@@ -1999,6 +1998,14 @@ void ise_check_wearable_candidate() {
         ise_app_candidate_show();
     }
 }
+
+void ise_set_emoticon_label(int group_id)
+{
+    const int BUF_LEN = 16;
+    char buf[BUF_LEN] = {0};
+    snprintf(buf, BUF_LEN, "%d/3", group_id);
+    g_ui->set_private_key("EMOTICON_GROUP_ID", buf, NULL, NULL, 0, const_cast<sclchar*>("EMOTICON_GROUP_NEXT"), TRUE);
+}
 #endif
 
 // when it is the time to auto_cap, the