DownloadAgent fixes and improvements
This commit is contained in:
@@ -39,6 +39,12 @@ namespace FoxTube.Background
|
||||
Thumbnail = thumbnailUrl;
|
||||
}
|
||||
|
||||
public string GetXml()
|
||||
{
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public UIElement GetNotification()
|
||||
{
|
||||
StackPanel stackPanel = new StackPanel() { Margin = new Thickness(10, 0, 0, 0) };
|
||||
@@ -155,17 +161,71 @@ namespace FoxTube.Background
|
||||
break;
|
||||
|
||||
case NotificationType.Video:
|
||||
template.LoadXml($@"<toast launch='action=viewPhoto&photoId=92187'>
|
||||
template.LoadXml($@"<toast launch='action=viewPhoto&photoId=92187'>
|
||||
<visual>
|
||||
<binding template='ToastGeneric'>
|
||||
<image placement='appLogoOverride' hint-crop='circle' src='{Avatar}'/>
|
||||
<text>{Channel} uploaded a new video</text>
|
||||
<text>{Content}</text>
|
||||
<image src='{Thumbnail}'/>
|
||||
</binding>
|
||||
</visual>
|
||||
|
||||
<actions>
|
||||
<action content='Watch later'
|
||||
activationType='background'
|
||||
arguments='likePhoto&photoId=92187'/>
|
||||
<action content='Go to channel'
|
||||
arguments='action=commentPhoto&photoId=92187'/>
|
||||
</actions>
|
||||
</toast>");
|
||||
break;
|
||||
|
||||
case NotificationType.Internal:
|
||||
string thumb1 = string.IsNullOrWhiteSpace(Thumbnail) ? "Assets/AnnouncementThumb.png" : Thumbnail;
|
||||
<text>{Content}</text>
|
||||
template.LoadXml($@"<toast launch='action=openThread&threadId=92187'>
|
||||
<visual>
|
||||
<binding template='ToastGeneric'>
|
||||
<image placement='hero' src='{thumb1}'/>
|
||||
<image placement='appLogoOverride' hint-crop='circle' src='Assets/LogoAvatar.png'/>
|
||||
<text>{Channel}</text>
|
||||
<text hint-maxLines='5'>{Content}</text>
|
||||
</binding>
|
||||
</visual>
|
||||
|
||||
<actions>
|
||||
<action content='Watch full post'
|
||||
arguments='action=commentPhoto&photoId=92187'/>
|
||||
<action content='Manage notifications'
|
||||
arguments='action=commentPhoto&photoId=92187'/>
|
||||
</actions>
|
||||
</toast>");
|
||||
break;
|
||||
|
||||
case NotificationType.Post:
|
||||
string thumb2 = string.IsNullOrWhiteSpace(Thumbnail) ? "" : $"<image placement='hero' src ='{Thumbnail}'/>";
|
||||
<actions>
|
||||
template.LoadXml($@"<toast launch='action=openThread&threadId=92187'>
|
||||
<visual>
|
||||
<binding template='ToastGeneric'>
|
||||
{thumb2}
|
||||
<image placement='appLogoOverride' hint-crop='circle' src='{Avatar}'/>
|
||||
<text>{Channel}</text>
|
||||
<text hint-maxLines='5'>{Content}</text>
|
||||
</binding>
|
||||
</visual>
|
||||
|
||||
<actions>
|
||||
<input id='textBox' type='text' placeHolderContent='Leave a comment'/>
|
||||
<action content='Send'
|
||||
imageUri='Assets/Icons/send.png'
|
||||
hint-inputId='textBox'
|
||||
activationType='background'
|
||||
arguments='action=reply&threadId=92187'/>
|
||||
|
||||
<action content='Like'
|
||||
arguments='action=commentPhoto&photoId=92187'/>
|
||||
</actions>
|
||||
</toast>");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user