Archived
1
0

bug fixes

This commit is contained in:
Michael Gordeev
2018-08-24 23:30:50 +03:00
parent 4639b9c77b
commit 94d59f1dba
9 changed files with 59 additions and 31 deletions
+1
View File
@@ -144,6 +144,7 @@ namespace FoxTube.Controls
request.ParentId = item.Id;
request.MaxResults = 10;
request.PageToken = NextPageToken;
request.TextFormat = CommentsResource.ListRequest.TextFormatEnum.PlainText;
var response = await request.ExecuteAsync();
foreach (Comment c in response.Items)
+1 -1
View File
@@ -46,7 +46,7 @@ namespace FoxTube.Controls
title.Text = item.Snippet.Title;
channelName.Text = item.Snippet.ChannelTitle;
counter.Text = item.ContentDetails.ItemCount.ToString();
date.Text = item.Snippet.PublishedAt.ToString();
date.Text = Methods.GetAgo(item.Snippet.PublishedAt.Value);
ChannelsResource.ListRequest r = SecretsVault.NoAuthService.Channels.List("snippet");
r.Id = item.Snippet.ChannelId;
+3 -2
View File
@@ -9,13 +9,12 @@
mc:Ignorable="d"
d:DesignHeight="1080"
d:DesignWidth="1920"
Tapped="UserControl_Tapped"
DoubleTapped="UserControl_DoubleTapped"
PointerMoved="UserControl_PointerMoved"
PointerExited="UserControl_PointerExited"
PointerEntered="UserControl_PointerEntered">
<Grid Background="White" Name="grid">
<Grid Background="White" Name="grid" Tapped="UserControl_Tapped">
<MediaElement IsDoubleTapEnabled="False" CurrentStateChanged="videoSource_CurrentStateChanged" AutoPlay="False" Name="videoSource" AreTransportControlsEnabled="False" PosterSource="ms-appx:///Assets/videoThumbSample.png"/>
<TextBox Name="subtitleCapture" Visibility="Collapsed" Text="This is subtitle capture" Background="#99000000" VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="White" FontSize="24" Padding="10" Margin="0,0,0,100"/>
<Grid Name="controls" Visibility="Visible">
@@ -42,6 +41,8 @@
</StackPanel>
</Grid>
<Grid Grid.Row="1" Name="playPauseArea" Tapped="playPauseArea_Tapped"/>
<Grid Name="touchCentral" Background="#7F000000" Visibility="Collapsed" Grid.Row="1">
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button VerticalAlignment="Center" Content="&#xED3C;" FontFamily="Segoe MDL2 Assets" Background="Transparent" FontSize="40" Foreground="WhiteSmoke" Name="touchBack10" Click="back10_Click"/>
+5
View File
@@ -794,5 +794,10 @@ namespace FoxTube
else if (!miniView && !fullScreen)
fullscreen_Click(this, null);
}
private void playPauseArea_Tapped(object sender, TappedRoutedEventArgs e)
{
if (e.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Mouse) ;
}
}
}
-1
View File
@@ -160,7 +160,6 @@ namespace FoxTube.Pages
playlistRequest = SecretsVault.Service.Search.List("id");
playlistRequest.ChannelId = channelId;
playlistRequest.Type = "playlist";
playlistRequest.Order = SearchResource.ListRequest.OrderEnum.Date;
playlistRequest.MaxResults = 48;
SearchListResponse response = await playlistRequest.ExecuteAsync();
+1
View File
@@ -127,6 +127,7 @@ namespace FoxTube.Pages
var request = SecretsVault.Service.CommentThreads.List("snippet,replies");
request.Order = order;
request.VideoId = threadId;
request.TextFormat = CommentThreadsResource.ListRequest.TextFormatEnum.PlainText;
var response = await request.ExecuteAsync();
nextPageToken = response.NextPageToken;
+11
View File
@@ -17,12 +17,15 @@ using Windows.UI.Xaml.Navigation;
namespace FoxTube
{
public enum LoadingState { Loadnig, Loaded, Error, Blocked }
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class LoadingPage : Page
{
public event RoutedEventHandler RefreshPage;
public LoadingState State { get; private set; } = LoadingState.Loadnig;
public LoadingPage()
{
@@ -50,6 +53,8 @@ namespace FoxTube
trouble.Visibility = Visibility.Visible;
}
State = LoadingState.Error;
}
public void Block()
@@ -60,6 +65,8 @@ namespace FoxTube
wifiTrouble.Visibility = Visibility.Collapsed;
blockIcon.Visibility = Visibility.Visible;
State = LoadingState.Blocked;
}
private async void openWifi_Click(object sender, RoutedEventArgs e)
@@ -90,11 +97,15 @@ namespace FoxTube
trouble.Visibility = Visibility.Collapsed;
wifiTrouble.Visibility = Visibility.Collapsed;
blockIcon.Visibility = Visibility.Collapsed;
State = LoadingState.Loadnig;
}
public void Close()
{
Visibility = Visibility.Collapsed;
State = LoadingState.Loaded;
}
}
}
+36 -26
View File
@@ -506,32 +506,35 @@ namespace FoxTube
} },
{ typeof(ChannelPage), () =>
{
if((content.Content as ChannelPage).channelId == SecretsVault.AccountId)
if(SecretsVault.IsAuthorized)
{
if(nav.SelectedItem != toChannel)
nav.SelectedItem = toChannel;
else
s = Sender.None;
}
else
{
bool b = false;
for(int k = 0; k < SecretsVault.Subscriptions.Count && k < 10; k++)
if(SecretsVault.Subscriptions[k].Snippet.ResourceId.ChannelId == (content.Content as ChannelPage).channelId)
{
if(nav.SelectedItem != nav.MenuItems[k + 9])
nav.SelectedItem = nav.MenuItems[k + 9];
else
s = Sender.None;
b = true;
break;
}
if(!b)
if((content.Content as ChannelPage).channelId == SecretsVault.AccountId)
{
nav.SelectedItem = null;
if(nav.SelectedItem != toChannel)
nav.SelectedItem = toChannel;
else
s = Sender.None;
}
else
{
bool found = false;
for(int k = 0; k < SecretsVault.Subscriptions.Count && k < 10; k++)
if(SecretsVault.Subscriptions[k].Snippet.ResourceId.ChannelId == (content.Content as ChannelPage).channelId)
{
if(nav.SelectedItem != nav.MenuItems[k + 9])
nav.SelectedItem = nav.MenuItems[k + 9];
else
s = Sender.None;
found = true;
break;
}
if(!found)
nav.SelectedItem = null;
}
}
else
nav.SelectedItem = null;
} },
{ typeof(PlaylistPage), () =>
{
@@ -599,10 +602,14 @@ namespace FoxTube
else
nav.IsBackEnabled = false;
if ((e.SourcePageType == typeof(Home) || e.SourcePageType == typeof(Settings)) && nav.DisplayMode == NavigationViewDisplayMode.Expanded)
nav.IsPaneOpen = true;
if (e.SourcePageType == typeof(Home) || e.SourcePageType == typeof(Settings) || e.SourcePageType == typeof(Subscriptions))
{
nav.ExpandedModeThresholdWidth = 1008;
if (nav.DisplayMode == NavigationViewDisplayMode.Expanded)
nav.IsPaneOpen = true;
}
else
nav.IsPaneOpen = false;
nav.ExpandedModeThresholdWidth = int.MaxValue;
if (videoPlaceholder.Content != null && (videoPlaceholder.Parent as DropShadowPanel).HorizontalAlignment == HorizontalAlignment.Stretch)
MinimizeAsInitializer();
@@ -618,7 +625,10 @@ namespace FoxTube
if (videoPlaceholder.Content != null)
{
DropShadowPanel panel = videoPlaceholder.Parent as DropShadowPanel;
if (panel.HorizontalAlignment == HorizontalAlignment.Stretch)
if ((videoPlaceholder.Content as VideoPage).loading.State != LoadingState.Loaded)
CloseVideo();
else if (panel.HorizontalAlignment == HorizontalAlignment.Stretch)
MinimizeAsInitializer();
else
content.GoBack();
+1 -1
View File
@@ -74,7 +74,7 @@ namespace FoxTube.Pages
public VideoPlayer player;
public CommentsPage comments;
LoadingPage loading;
public LoadingPage loading;
public VideoPage()
{