Upload with Tor
This commit is contained in:
parent
9fd697e31b
commit
b9bd118df2
|
@ -4102,7 +4102,9 @@ public class API {
|
|||
JSONObject resobj = jsonArray.getJSONObject(i);
|
||||
Status status = parseStatuses(context, resobj);
|
||||
i++;
|
||||
statuses.add(status);
|
||||
if( status != null) {
|
||||
statuses.add(status);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (JSONException e) {
|
||||
|
|
|
@ -566,7 +566,11 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
bar.setHeight1(30);
|
||||
items.add(bar);
|
||||
}else {
|
||||
BarItem bar = new BarItem(pollOption.getTitle(), value, "%", ContextCompat.getColor(context, R.color.mastodonC2), Color.WHITE);
|
||||
BarItem bar;
|
||||
if( theme == Helper.THEME_LIGHT)
|
||||
bar = new BarItem(pollOption.getTitle(), value, "%", ContextCompat.getColor(context, R.color.mastodonC2), Color.BLACK);
|
||||
else
|
||||
bar = new BarItem(pollOption.getTitle(), value, "%", ContextCompat.getColor(context, R.color.mastodonC2), Color.WHITE);
|
||||
bar.setRounded(true);
|
||||
bar.setHeight1(30);
|
||||
items.add(bar);
|
||||
|
|
|
@ -4027,12 +4027,6 @@ public class Helper {
|
|||
public static void initNetCipher(Context context) {
|
||||
Context appContext = context.getApplicationContext();
|
||||
|
||||
if (!OrbotHelper.get(appContext).init() && OrbotHelper.isOrbotInstalled(appContext)) {
|
||||
orbotConnected = false;
|
||||
context.startActivity(OrbotHelper.getOrbotInstallIntent(appContext));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
StrongOkHttpClientBuilder.forMaxSecurity(appContext).build(new StrongBuilder.Callback<OkHttpClient>() {
|
||||
@Override
|
||||
|
@ -4060,42 +4054,6 @@ public class Helper {
|
|||
}
|
||||
|
||||
|
||||
public static void initNetCipherHttp(Context context) {
|
||||
Context appContext = context.getApplicationContext();
|
||||
|
||||
if (!OrbotHelper.get(appContext).init() && OrbotHelper.isOrbotInstalled(appContext)) {
|
||||
orbotConnected = false;
|
||||
context.startActivity(OrbotHelper.getOrbotInstallIntent(appContext));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
StrongConnectionBuilder.forMaxSecurity(appContext).build(new StrongConnectionBuilder.Callback<HttpURLConnection>() {
|
||||
|
||||
@Override
|
||||
public void onConnected(HttpURLConnection httpURLConnection) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnectionException(Exception e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTimeout() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInvalid() {
|
||||
|
||||
}
|
||||
});
|
||||
} catch (Exception ignored) { }
|
||||
}
|
||||
|
||||
|
||||
public static OkHttpClient getHttpClient(Context context) {
|
||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder()
|
||||
.followRedirects(true)
|
||||
|
|
Loading…
Reference in New Issue