Items cards' context menu. Fixed duplicating authors' name on comments replies. Another version of logo
Related Work Items: #226
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Google.Apis.YouTube.v3;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using System;
|
||||
using Windows.ApplicationModel.DataTransfer;
|
||||
using Windows.Foundation;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
@@ -19,6 +21,7 @@ namespace FoxTube.Controls
|
||||
{
|
||||
InitializeComponent();
|
||||
Initialize(id);
|
||||
DataTransferManager.GetForCurrentView().DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(Share);
|
||||
}
|
||||
|
||||
public async void Initialize(string id)
|
||||
@@ -54,5 +57,31 @@ namespace FoxTube.Controls
|
||||
{
|
||||
Methods.MainPage.GoToPlaylist(item.Id);
|
||||
}
|
||||
|
||||
private void OpenChannel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Methods.MainPage.GoToChannel(item.Snippet.ChannelId);
|
||||
}
|
||||
|
||||
private void GetLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DataPackage data = new DataPackage();
|
||||
data.SetText($"https://www.youtube.com/playlist?list={playlistId}");
|
||||
Clipboard.SetContent(data);
|
||||
}
|
||||
|
||||
private void Share_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DataTransferManager.ShowShareUI();
|
||||
}
|
||||
|
||||
private void Share(DataTransferManager sender, DataRequestedEventArgs args)
|
||||
{
|
||||
Methods.Share(args,
|
||||
item.Snippet.Thumbnails.Medium.Url,
|
||||
item.Snippet.Title,
|
||||
$"https://www.youtube.com/playlist?list={item.Id}",
|
||||
"playlist");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user