Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
More preparation for #42
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Dec 14, 2018
1 parent 986a320 commit 9385e19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 6 additions & 9 deletions UWP XMPP Client/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,13 @@ private async Task onActivatedOrLaunchedAsync(IActivatedEventArgs args)
Logger.Info("App activated by protocol activation with: " + protocolActivationArgs.Uri.ToString());

// If we're currently not on a page, navigate to the main page
if (rootFrame.Content is null)
if (!Settings.getSettingBoolean(SettingsConsts.INITIALLY_STARTED))
{
if (!Settings.getSettingBoolean(SettingsConsts.INITIALLY_STARTED))
{
rootFrame.Navigate(typeof(AddAccountPage), "App.xaml.cs"); // ToDo add arguments
}
else
{
rootFrame.Navigate(typeof(ChatPage), "App.xaml.cs"); // ToDo add arguments
}
rootFrame.Navigate(typeof(AddAccountPage), "App.xaml.cs"); // ToDo add arguments
}
else
{
rootFrame.Navigate(typeof(ChatPage), protocolActivationArgs); // ToDo add arguments
}
}
else if (args is ToastNotificationActivatedEventArgs toastActivationArgs)
Expand Down
8 changes: 8 additions & 0 deletions UWP XMPP Client/Pages/ChatPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using UWP_XMPP_Client.Classes.Collections;
using UWP_XMPP_Client.DataTemplates;
using UWP_XMPP_Client.Dialogs;
using Windows.ApplicationModel.Activation;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
Expand Down Expand Up @@ -235,6 +236,13 @@ protected async override void OnNavigatedTo(NavigationEventArgs e)
{
toastActivationString = chatToastActivation.CHAT_ID;
}
else if(e.Parameter is ProtocolActivatedEventArgs protocolActivationArgs)
{
if(!string.IsNullOrEmpty(protocolActivationArgs.Uri.PathAndQuery))
{
// ToDo: Handle Uri activation
}
}
loadChats(toastActivationString);

loading_grid.Visibility = Visibility.Collapsed;
Expand Down

0 comments on commit 9385e19

Please sign in to comment.