mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 22:57:29 +00:00
Merge branch 'master' into pr/170
This commit is contained in:
commit
03bd549016
@ -17,7 +17,7 @@ import awais.instagrabber.utils.Utils;
|
|||||||
|
|
||||||
import static awais.instagrabber.utils.Utils.settingsHelper;
|
import static awais.instagrabber.utils.Utils.settingsHelper;
|
||||||
|
|
||||||
public class CommentAction extends AsyncTask<String, Void, String> {
|
public class CommentAction extends AsyncTask<Void, Void, String> {
|
||||||
private static final String TAG = "CommentAction";
|
private static final String TAG = "CommentAction";
|
||||||
|
|
||||||
private final String cookie;
|
private final String cookie;
|
||||||
@ -30,8 +30,7 @@ public class CommentAction extends AsyncTask<String, Void, String> {
|
|||||||
this.onTaskCompleteListener = onTaskCompleteListener;
|
this.onTaskCompleteListener = onTaskCompleteListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String doInBackground(String... rawAction) {
|
protected String doInBackground(Void... lmao) {
|
||||||
final String action = rawAction[0];
|
|
||||||
final String url = "https://i.instagram.com/api/v1/direct_v2/create_group_thread/";
|
final String url = "https://i.instagram.com/api/v1/direct_v2/create_group_thread/";
|
||||||
HttpURLConnection urlConnection = null;
|
HttpURLConnection urlConnection = null;
|
||||||
try {
|
try {
|
||||||
@ -57,10 +56,8 @@ public class CommentAction extends AsyncTask<String, Void, String> {
|
|||||||
if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
||||||
return new JSONObject(NetworkUtils.readFromConnection(urlConnection)).getString("thread_id");
|
return new JSONObject(NetworkUtils.readFromConnection(urlConnection)).getString("thread_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(TAG, "reply (CT): " + ex);
|
Log.e(TAG, "reply (CT): " + ex);
|
||||||
// Toast.makeText(getApplicationContext(), R.string.downloader_unknown_error, Toast.LENGTH_SHORT).show();
|
|
||||||
} finally {
|
} finally {
|
||||||
if (urlConnection != null) {
|
if (urlConnection != null) {
|
||||||
urlConnection.disconnect();
|
urlConnection.disconnect();
|
||||||
|
Loading…
Reference in New Issue
Block a user