internal async Task HandleForumCommand(ForumCommand test) { switch (test.Type) { default: break; } }
internal async Task HandleForumCommand(ForumCommand test) { switch (test.Type) { case "streaming": if (Selected.CurrentPage >= Selected.TotalPages) { return; } Selected.CurrentPage++; Selected.ScrollToPost = 0; Selected.ScrollToPostString = string.Empty; await LoadThread(); break; case "loaded": IsPageLoaded = true; break; case "quote": var reply = JsonConvert.SerializeObject(new ThreadReply() { Thread = new Thread() { ForumId = Selected.ForumId, ThreadId = Selected.ThreadId, Name = Selected.Name, CurrentPage = Selected.CurrentPage, TotalPages = Selected.TotalPages }, QuoteId = test.Command.PostId }); NavigationService.Navigate(typeof(ReplyPage), reply); break; case "ignored": IsLoading = true; int postId = test.Command.PostId; var newPost = await _postManager.GetPostAsync(postId); await Web.InvokeScriptAsync("FromCSharp", ForumCommandCreator.CreateForumCommand("showIgnoredPost", newPost)); IsLoading = false; break; case "error": break; default: break; } }