Nitter feeds: Don't add a comma after the last username

This commit is contained in:
Ash 2020-08-01 19:18:57 +05:30
parent 87d29e835a
commit 680d734d54
1 changed files with 9 additions and 2 deletions

View File

@ -3465,8 +3465,15 @@ public class API {
return apiResponse;
}
StringBuilder urlparams = new StringBuilder();
for (String param : usernames) {
urlparams.append(param.trim()).append(",");
{
int i = 0;
while (i < usernames.length) {
String username = usernames[i].trim();
urlparams.append(username);
if (i != usernames.length - 1) urlparams.append(",");
i++;
}
}
String url = "https://" + nitterHost + "/" + urlparams + "/rss";