Skip to content

Commit

Permalink
Small Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MaKrotos committed May 20, 2024
1 parent 5470194 commit 56f3607
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 72 deletions.
2 changes: 1 addition & 1 deletion VK UI3 (Package)/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Identity
Name="FDW.VKM"
Publisher="CN=FDW"
Version="0.1.7.1" />
Version="0.1.7.2" />

<mp:PhoneIdentity PhoneProductId="b7c1f34e-9025-4935-9d7a-7d0a632a368d" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
4 changes: 3 additions & 1 deletion VK UI3/Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
IsPaneOpen="False"
IsSettingsVisible="True"
PaneDisplayMode="Auto"
SelectionChanged="NavWiv_SelectionChanged">
ItemInvoked="NavWiv_ItemInvoked"

>

<NavigationView.MenuItems>

Expand Down
139 changes: 72 additions & 67 deletions VK UI3/Views/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ private async Task CreateNavigation()
this.DispatcherQueue.TryEnqueue(async () =>
{
NavWiv.SelectedItem = 0;
navigateInvoke();
ClearMenuItems();
});
var catalogs = await VK.vkService.GetAudioCatalogAsync();
Expand Down Expand Up @@ -411,14 +412,79 @@ private void ListViewItem_PointerEntered(object sender, PointerRoutedEventArgs e


bool navToAnotherPage = false;
private void NavWiv_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)


public static void OpenMyPage(SectionType sectionType)
{
var sectionView = new WaitParameters();
sectionView.sectionType = sectionType;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}


public static void OpenPlayListLists(long? id = null, OpenedPlayList openedPlayList = OpenedPlayList.all)
{
var sectionView = new WaitParameters();
if (id == null)
id = activeAccount.id;
sectionView.sectionType = SectionType.UserPlayListList;
sectionView.SectionID = id.ToString();
sectionView.openedPlayList = openedPlayList;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}


public static void OpenPlayList(AudioPlaylist playlist)
{
var waitParameters = new WaitParameters();
waitParameters.sectionType = SectionType.PlayList;
waitParameters.Playlist = playlist;
frame.Navigate(typeof(WaitView), waitParameters, new DrillInNavigationTransitionInfo());
}

public static void OpenPlayList(IVKGetAudio iVKGetAudio)
{
var sectionView = new WaitParameters();
sectionView.sectionType = SectionType.PlayList;
sectionView.iVKGetAudio = iVKGetAudio;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}

public static void OpenPlayList(long AlbumID, long AlbumOwnerID, string AlbumAccessKey)
{
var sectionView = new WaitParameters();
sectionView.sectionType = SectionType.PlayList;
Playlist playlist = new Playlist();
playlist.Id = AlbumID;
playlist.OwnerId = AlbumOwnerID;
playlist.AccessKey = AlbumAccessKey;
PlayListVK playListVK = new PlayListVK(playlist, dispatcherQueue);
sectionView.iVKGetAudio = playListVK;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}

public static void OpenSection(string sectionID, SectionType sectionType = SectionType.None)
{
var sectionView = new WaitParameters();
sectionView.SectionID = sectionID;
sectionView.sectionType = sectionType;

frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}

private void NavWiv_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
{
navigateInvoke();
}

private void navigateInvoke()
{
var invokedItem = sender.SelectedItem as NavigationViewItem;
var invokedItem = NavWiv.SelectedItem as NavigationViewItem;

if (invokedItem == null)
{
sender.SelectedItem = sender.MenuItems[0];
return;
NavWiv.SelectedItem = NavWiv.MenuItems[0];
invokedItem = NavWiv.SelectedItem as NavigationViewItem;
}

if (invokedItem != null && invokedItem.Content != null)
Expand Down Expand Up @@ -455,7 +521,7 @@ private void NavWiv_SelectionChanged(NavigationView sender, NavigationViewSelect


default:
var Item = sender.SelectedItem as NavMenuController;
var Item = NavWiv.SelectedItem as NavMenuController;
OpenSection(Item.navSettings.section.Id);


Expand All @@ -477,70 +543,9 @@ private void NavWiv_SelectionChanged(NavigationView sender, NavigationViewSelect


}


// NavWiv.IsBackEnabled = ContentFrame.CanGoBack;
}

public static void OpenMyPage(SectionType sectionType)
{
var sectionView = new WaitParameters();
sectionView.sectionType = sectionType;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}


public static void OpenPlayListLists(long? id = null, OpenedPlayList openedPlayList = OpenedPlayList.all)
{
var sectionView = new WaitParameters();
if (id == null)
id = activeAccount.id;
sectionView.sectionType = SectionType.UserPlayListList;
sectionView.SectionID = id.ToString();
sectionView.openedPlayList = openedPlayList;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}


public static void OpenPlayList(AudioPlaylist playlist)
{
var waitParameters = new WaitParameters();
waitParameters.sectionType = SectionType.PlayList;
waitParameters.Playlist = playlist;
frame.Navigate(typeof(WaitView), waitParameters, new DrillInNavigationTransitionInfo());
}

public static void OpenPlayList(IVKGetAudio iVKGetAudio)
{
var sectionView = new WaitParameters();
sectionView.sectionType = SectionType.PlayList;
sectionView.iVKGetAudio = iVKGetAudio;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}

public static void OpenPlayList(long AlbumID, long AlbumOwnerID, string AlbumAccessKey)
{
var sectionView = new WaitParameters();
sectionView.sectionType = SectionType.PlayList;
Playlist playlist = new Playlist();
playlist.Id = AlbumID;
playlist.OwnerId = AlbumOwnerID;
playlist.AccessKey = AlbumAccessKey;
PlayListVK playListVK = new PlayListVK(playlist, dispatcherQueue);
sectionView.iVKGetAudio = playListVK;
frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}

public static void OpenSection(string sectionID, SectionType sectionType = SectionType.None)
{
var sectionView = new WaitParameters();
sectionView.SectionID = sectionID;
sectionView.sectionType = sectionType;

frame.Navigate(typeof(WaitView), sectionView, new DrillInNavigationTransitionInfo());
}



}


Expand Down
3 changes: 2 additions & 1 deletion VK UI3/Views/ModalsPages/CreatePlayList.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
<Grid Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}">
<ScrollView
x:Name="MainGrid"
Padding="10"
Padding="10,35,10,30"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"

CornerRadius="8">


Expand Down
9 changes: 7 additions & 2 deletions VK UI3/Views/Share/ShareControllers/ConvController.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:VK_UI3.Views.Share.ShareControllers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
MaxHeight="70"
DataContextChanged="UserControl_DataContextChanged"
PointerEntered="StackPanel_PointerEntered"
PointerExited="StackPanel_PointerExited"
PointerPressed="StackPanel_PointerPressed"
Translation="0,0,16"
MaxHeight="70"
mc:Ignorable="d">
<UserControl.Shadow>
<ThemeShadow />
Expand Down Expand Up @@ -74,7 +74,12 @@



<Grid Margin="8" x:Name="MainGrid" CornerRadius="8">
<Grid
Padding="8,8,8,8"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{ThemeResource LayerOnAccentAcrylicFillColorDefaultBrush}"
CornerRadius="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
Expand Down

0 comments on commit 56f3607

Please sign in to comment.