summaryrefslogtreecommitdiff
path: root/Juick/ThreadView.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ThreadView.xaml.cs')
-rw-r--r--Juick/ThreadView.xaml.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Juick/ThreadView.xaml.cs b/Juick/ThreadView.xaml.cs
index b197a8b..4e1da97 100644
--- a/Juick/ThreadView.xaml.cs
+++ b/Juick/ThreadView.xaml.cs
@@ -7,6 +7,8 @@ using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Data;
using System.Windows;
+using RestSharp;
+using System.Net;
namespace Juick
{
@@ -72,5 +74,20 @@ namespace Juick
// Reset selected index to -1 (no selection)
((ListBox)sender).SelectedIndex = -1;
}
+
+ void RecommendBarMenuItem_Click(object sender, EventArgs e)
+ {
+ var request = new RestRequest("/post", Method.POST);
+ request.AddParameter("body", "! #" + Model.Mid);
+ App.AppContext.Client.ExecuteAsync(request, response =>
+ {
+ App.AppContext.IsDataLoading = false;
+ if (response.StatusCode != HttpStatusCode.OK && !string.IsNullOrEmpty(response.Content))
+ {
+ MessageBox.Show(string.Concat(response.StatusCode, ": ", response.Content));
+ }
+ });
+ App.AppContext.IsDataLoading = true;
+ }
}
} \ No newline at end of file