Fix cache and boosts
This commit is contained in:
parent
4b21eae461
commit
97cc6343e7
|
@ -57,7 +57,6 @@ public class RetrieveRemoteDataAsyncTask extends AsyncTask<Void, Void, Void> {
|
|||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
API api = new API(this.contextReference.get());
|
||||
Log.v(Helper.TAG,"url: " + this.url);
|
||||
APIResponse apiResponse = api.search(this.url);
|
||||
if( apiResponse.getResults() != null)
|
||||
results = apiResponse.getResults();
|
||||
|
|
|
@ -21,7 +21,6 @@ import android.database.sqlite.SQLiteDatabase;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
|
@ -2282,7 +2281,11 @@ public class API {
|
|||
LocalBroadcastManager.getInstance(context).sendBroadcast(intentBC);
|
||||
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
Account account = new AccountDAO(context, db).getAccountByToken(prefKeyOauthTokenT);
|
||||
new TimelineCacheDAO(context, db).update(targetedId, resp, account.getId(), account.getInstance());
|
||||
Status indb = new TimelineCacheDAO(context, db).getSingle(targetedId);
|
||||
if( indb != null) {
|
||||
String response = httpsConnection.get(getAbsoluteUrl(String.format("/statuses/%s", targetedId)), 60, null, prefKeyOauthTokenT);
|
||||
new TimelineCacheDAO(context, db).update(targetedId, response, account.getId(), account.getInstance());
|
||||
}
|
||||
}
|
||||
} catch (HttpsConnection.HttpsConnectionException e) {
|
||||
setError(e.getStatusCode(), e);
|
||||
|
|
|
@ -138,9 +138,7 @@ public class CrossActions {
|
|||
confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION_FAV, false);
|
||||
else if (doAction == API.StatusAction.UNREBLOG || doAction == API.StatusAction.REBLOG)
|
||||
confirmation = sharedpreferences.getBoolean(Helper.SET_NOTIF_VALIDATION, true);
|
||||
else if (doAction == API.StatusAction.FOLLOW || doAction == API.StatusAction.UNFOLLOW)
|
||||
confirmation = false;
|
||||
if(type != null && type == RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && limitedToOwner){
|
||||
if(type == RetrieveFeedsAsyncTask.Type.REMOTE_INSTANCE && limitedToOwner){
|
||||
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
|
||||
String instance = sharedpreferences.getString(Helper.PREF_INSTANCE, null);
|
||||
SQLiteDatabase db = Sqlite.getInstance(context, Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
|
||||
|
|
Loading…
Reference in New Issue