Add index to label when the item has no label 31/281731/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 21 Sep 2022 04:55:34 +0000 (13:55 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Wed, 21 Sep 2022 07:00:37 +0000 (16:00 +0900)
Change-Id: I442e57933df49065ba7da3a6ef65279559404cc7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/mmimgr/iu/VoiceTouchEngine.cpp

index 0c4b13de94cca69a0753a93c78764377921b60cc..f8cd787fb37559b10995fbf4163ed1a275ea04cc 100644 (file)
@@ -354,7 +354,8 @@ void VoiceTouchEngine::makeClickableItemInfo(int timestamp, JsonProvider &provid
        provider.setUiClickableObject(resultType, __appId.c_str(), tooltipType, __itemList.size(), timestamp);
 
        for (auto &item : *itemList) {
-               provider.addInfoClickableObject(item.index, item.coordX, item.coordY, item.width, item.height, item.label.c_str());
+               auto label = (item.label.empty() ? to_string(item.index) : item.label);
+               provider.addInfoClickableObject(item.index, item.coordX, item.coordY, item.width, item.height, label.c_str());
        }
 }