Archived
1
0

Added ability to delete comments. Fixes

Related Work Items: #228, #234
This commit is contained in:
Michael Gordeev
2018-12-25 19:37:14 +03:00
parent 613a135897
commit 6303f1753b
5 changed files with 69 additions and 10 deletions
+7 -4
View File
@@ -1,18 +1,15 @@
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;
using FoxTube.Controls;
using Windows.UI.Popups;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
namespace FoxTube.Pages
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// Comments placeholder
/// </summary>
public sealed partial class CommentsPage : Page
{
@@ -29,6 +26,7 @@ namespace FoxTube.Pages
public async void Initialize(Video video)
{
threadId = video.Id;
Methods.CommentsPage = this;
if (!SecretsVault.IsAuthorized)
grid.RowDefinitions[0].Height = new GridLength(0);
@@ -53,6 +51,11 @@ namespace FoxTube.Pages
placeholder.Children.Add(new CommentCard(comment));
}
public void RemoveComment(CommentCard commentCard)
{
placeholder.Children.Remove(commentCard);
}
private async void more_Click(object sender, RoutedEventArgs e)
{
more.Visibility = Visibility.Collapsed;
+2 -1
View File
@@ -444,7 +444,8 @@ namespace FoxTube
else
{
nav.CompactModeThresholdWidth = 641;
nav.ExpandedModeThresholdWidth = 1008;
if(videoPlaceholder.Content == null)
nav.ExpandedModeThresholdWidth = 1008;
nav.Margin = new Thickness(0);
if (videoPlaceholder.Content != null && nav.IsPaneOpen)
nav.IsPaneOpen = false;