From: Kyuho Jo Date: Thu, 2 Mar 2017 08:39:46 +0000 (+0900) Subject: Simplify codes for assigning of apps icon X-Git-Tag: submit/tizen/20170808.015446~229 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98531782b240c55a0a83fb1d83dcef5b78ca56fb;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Simplify codes for assigning of apps icon Change-Id: I818e9b90ae9041e8dcd502e042e59d090c625307 Signed-off-by: Kyuho Jo --- diff --git a/TVHome/TVHome/Models/AppShortcutController.cs b/TVHome/TVHome/Models/AppShortcutController.cs index ce9d0f4..a705a71 100644 --- a/TVHome/TVHome/Models/AppShortcutController.cs +++ b/TVHome/TVHome/Models/AppShortcutController.cs @@ -53,22 +53,17 @@ namespace TVHome.Models appInfo.TryGetValue("IconPath", out appIconPath); DebuggingUtils.Dbg("AppID: " + appShortcutInfo.AppID + ", Label : " + appLabel + " IconPath : " + appIconPath); + Random random = new Random(); var defaultStateDescription = new StateDescription() { Label = appLabel, - IconPath = appIconPath, + IconPath = appIconPath??icons[random.Next(0, 6)], //IconPath = (resul5t[2] == null) ? "AppIcon.png" : result[2], Action = new AppControlAction { AppID = appShortcutInfo.AppID, } }; - if (defaultStateDescription.IconPath == null || defaultStateDescription.IconPath.Length == 0) - { - Random random = new Random(); - defaultStateDescription.IconPath = icons[random.Next(0, 6)]; //IconPath = (resul5t[2] == null) ? "AppIcon.png" : result[2], - } - appShortcutInfo.StateDescriptions.Add("default", defaultStateDescription); appShortcutInfo.CurrentStateDescription = defaultStateDescription; }