Skip to content

Commit

Permalink
iterating over the urls array rather than the first one
Browse files Browse the repository at this point in the history
  • Loading branch information
sidequestlegend authored Aug 1, 2019
1 parent f82b4e4 commit c474e3a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion BeatOn/ToastInjectorWebViewClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,18 @@ public override bool ShouldOverrideUrlLoading(WebView view, IWebResourceRequest
.Replace("%22,%22", "\",\"")
.Replace("[%22", "[\"")
.Replace("%22]", "\"]");

JArray urls = JArray.Parse(json);

if(urls.Count > 0)
{
Download?.Invoke(this, urls[0]);
for (int i = 0; i < urls.Count; i++)
{
Download?.Invoke(this, urls[i]);
}
return true;
}

}
else if (lowerUrl.StartsWith("beatsaver://"))
{
Expand Down

0 comments on commit c474e3a

Please sign in to comment.