summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/MainPage.xaml.cs10
-rw-r--r--Juick/ViewModels/AppViewModel.cs2
2 files changed, 7 insertions, 5 deletions
diff --git a/Juick/MainPage.xaml.cs b/Juick/MainPage.xaml.cs
index 23418ff..20beef5 100644
--- a/Juick/MainPage.xaml.cs
+++ b/Juick/MainPage.xaml.cs
@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
-using System.Text;
using System.Windows;
-using System.Windows.Controls;
using System.Windows.Data;
-using Juick.Controls;
using Microsoft.Phone.Controls;
-using Microsoft.Phone.Notification;
using Microsoft.Phone.Shell;
using Juick.ViewModels;
using RestSharp;
@@ -76,6 +72,12 @@ namespace Juick
{
NavigationService.Navigate(new Uri(navigateUri, UriKind.Relative));
}
+ if (queryStrings.ContainsKey("mid"))
+ {
+ var mid = queryStrings["mid"];
+ navigateUri = string.Format("/ThreadView.xaml?mid={0}", mid);
+ ((App)Application.Current).NavigateTo(new Uri(navigateUri, UriKind.Relative), true);
+ }
App.AppContext.Client.Authenticator = new HttpBasicAuthenticator(App.AppContext.Account.UserName, App.AppContext.Account.Password);
}
diff --git a/Juick/ViewModels/AppViewModel.cs b/Juick/ViewModels/AppViewModel.cs
index 29e2a6b..7d5006c 100644
--- a/Juick/ViewModels/AppViewModel.cs
+++ b/Juick/ViewModels/AppViewModel.cs
@@ -144,7 +144,7 @@ namespace Juick.ViewModels
if (!Account.IsAuthenticated) return;
Client.Authenticator = new HttpBasicAuthenticator(Account.UserName, Account.Password);
Debug.WriteLine(Url.ToString());
- if (string.IsNullOrEmpty(Account.NotificationUri) || Account.NotificationUri != Url)
+ if (string.IsNullOrEmpty(Account.NotificationUri) || Account.NotificationUri == Url)
{
Account.NotificationUri = Url;
RegisterNotificationUrl(Url);