Fix pin
This commit is contained in:
parent
957555c40b
commit
3737cdb5ca
|
@ -186,6 +186,7 @@ public class HashTagActivity extends BaseActivity implements OnRetrieveFeedsInte
|
|||
SQLiteDatabase db = Sqlite.getInstance(HashTagActivity.this, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
new SearchDAO(HashTagActivity.this, db).insertSearch(tag);
|
||||
Intent intent = new Intent(HashTagActivity.this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.putExtra(Helper.INTENT_ACTION, Helper.SEARCH_TAG);
|
||||
intent.putExtra(Helper.SEARCH_KEYWORD, tag);
|
||||
startActivity(intent);
|
||||
|
|
|
@ -5166,6 +5166,10 @@ public class API {
|
|||
List<Filters> filters = null;
|
||||
try {
|
||||
String response = new HttpsConnection(context, this.instance).get(getAbsoluteUrl("/filters"), 10, null, prefKeyOauthTokenT);
|
||||
if (response == null) {
|
||||
apiResponse.setFilters(new ArrayList<>());
|
||||
return apiResponse;
|
||||
}
|
||||
filters = parseFilters(new JSONArray(response));
|
||||
} catch (HttpsConnection.HttpsConnectionException e) {
|
||||
setError(e.getStatusCode(), e);
|
||||
|
|
|
@ -209,6 +209,13 @@ public class HttpsConnection {
|
|||
int code = httpresponse.code();
|
||||
String error = httpresponse.message();
|
||||
if (code >= 200 && code < 400) {
|
||||
if (!cache.isClosed()) {
|
||||
try {
|
||||
cache.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
getOKHttpHeader(httpresponse.headers().toMultimap());
|
||||
return response;
|
||||
} else {
|
||||
|
@ -224,7 +231,7 @@ public class HttpsConnection {
|
|||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new HttpsConnectionException(500, context.getString(R.string.toast_error));
|
||||
}else{
|
||||
|
||||
if (proxy != null)
|
||||
|
|
Loading…
Reference in New Issue