//Result protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { try { base.OnActivityResult(requestCode, resultCode, data); if (requestCode == 2500) { HybridController.EvaluateJavascript("Wo_GetNewPosts();"); } else if (requestCode == 3500) { string ID = data.GetStringExtra("PostId"); string Text = data.GetStringExtra("PostText"); string JavaCode = "$('#post-' + " + ID + ").find('#edit-post').attr('onclick', '{*type*:*edit_post*,*post_id*:*" + ID + "*,*edit_text*:*" + Text + "*}');"; string Decode = JavaCode.Replace("*", """); HybridController.EvaluateJavascript(Decode); HybridController.EvaluateJavascript("$('#post-' + " + ID + ").find('.post-description p').html('" + Text + "');"); } } catch (Exception e) { Crashes.TrackError(e); } }
private void TimerOnElapsed(object sender, ElapsedEventArgs e) { try { HybridController.EvaluateJavascript("Wo_GetNewPosts();"); } catch (Exception exception) { Crashes.TrackError(exception); } }