Optimization, refactoring, debugging
Related Work Items: #251, #252, #261
This commit is contained in:
@@ -8,12 +8,12 @@ namespace FoxTube.Background
|
||||
{
|
||||
public static class Notification
|
||||
{
|
||||
private static Dictionary<string, string> languagePack = LoadPack();
|
||||
private static readonly Dictionary<string, string> languagePack = LoadPack();
|
||||
|
||||
private static Dictionary<string, string> LoadPack()
|
||||
{
|
||||
object[] saved = JsonConvert.DeserializeObject<object[]>(ApplicationData.Current.RoamingSettings.Values["settings"] as string);
|
||||
if (saved[7] as string == "ru-RU")
|
||||
dynamic saved = JsonConvert.DeserializeObject<dynamic>(ApplicationData.Current.RoamingSettings.Values["settings"] as string);
|
||||
if (saved.language as string == "ru-RU")
|
||||
return new Dictionary<string, string>()
|
||||
{
|
||||
{ "addLater", "Посмотреть позже" },
|
||||
@@ -60,8 +60,8 @@ namespace FoxTube.Background
|
||||
<binding template='ToastGeneric'>
|
||||
<image placement='hero' src='{thumbnail.Replace("&", "%26")}'/>
|
||||
<image placement='appLogoOverride' hint-crop='circle' src='{avatar.Replace("&", "%26") ?? "http://foxgame-studio.000webhostapp.com/FoxTubeAssets/LogoAvatar.png"}'/>
|
||||
<text>{title}</text>
|
||||
<text>{channel} {languagePack["videoContent"]}</text>
|
||||
<text>{System.Security.SecurityElement.Escape(title)}</text>
|
||||
<text>{System.Security.SecurityElement.Escape(channel)} {languagePack["videoContent"]}</text>
|
||||
</binding>
|
||||
</visual>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user