Archived
1
0

Dark theme, navigation

This commit is contained in:
Michael Gordeev
2018-08-10 20:50:52 +03:00
parent 6969af84a8
commit b712bfb74e
32 changed files with 359 additions and 418 deletions
+7 -5
View File
@@ -12,14 +12,15 @@ namespace FoxTube.Controls
{
public sealed partial class VideoCard : UserControl
{
public string playlistId;
public string videoId;
Google.Apis.YouTube.v3.Data.Video item;
Video item;
bool embed = true;
public VideoCard(string id)
public VideoCard(string id, string playlist = null)
{
this.InitializeComponent();
Initialize(id);
Initialize(id, playlist);
}
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
@@ -27,7 +28,7 @@ namespace FoxTube.Controls
Height = e.NewSize.Width * 0.75;
}
public async void Initialize(string id)
public async void Initialize(string id, string playlist = null)
{
YouTubeService ytService = SecretsVault.NoAuthService;
@@ -37,6 +38,7 @@ namespace FoxTube.Controls
item = response.Items[0];
videoId = id;
playlistId = playlist;
title.Text = item.Snippet.Title;
channelName.Text = item.Snippet.ChannelTitle;
@@ -104,7 +106,7 @@ namespace FoxTube.Controls
await dialog.ShowAsync();
}
else
Methods.MainPage.GoToVideo(videoId);
Methods.MainPage.GoToVideo(videoId, playlistId);
}
}
}