mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fix crash when new user registers. For some unknown reason the code was
doing a feed pull and then always expecting folders when there obviously wouldn't be any if the user just registered.
This commit is contained in:
parent
d71b0a1dc9
commit
1957583767
2 changed files with 1 additions and 18 deletions
|
@ -10,7 +10,6 @@ import android.view.View;
|
|||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
@ -20,9 +19,7 @@ import com.newsblur.R;
|
|||
import com.newsblur.activity.AddSites;
|
||||
import com.newsblur.activity.Login;
|
||||
import com.newsblur.activity.LoginProgress;
|
||||
import com.newsblur.activity.Main;
|
||||
import com.newsblur.network.APIManager;
|
||||
import com.newsblur.network.domain.CategoriesResponse;
|
||||
import com.newsblur.network.domain.LoginResponse;
|
||||
|
||||
public class RegisterProgressFragment extends Fragment {
|
||||
|
@ -101,10 +98,7 @@ public class RegisterProgressFragment extends Fragment {
|
|||
Log.e(TAG, "Error sleeping during login.");
|
||||
}
|
||||
response = apiManager.signup(username, password, email);
|
||||
if (response.code != -1 && response.authenticated) {
|
||||
return apiManager.checkForFolders();
|
||||
}
|
||||
return false;
|
||||
return response.code != -1 && response.authenticated;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,13 +16,11 @@ import android.content.Context;
|
|||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.CookieSyncManager;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
@ -51,7 +49,6 @@ import com.newsblur.util.PrefsUtils;
|
|||
|
||||
public class APIManager {
|
||||
|
||||
private static final String TAG = "APIManager";
|
||||
private Context context;
|
||||
private static Gson gson;
|
||||
private ContentResolver contentResolver;
|
||||
|
@ -458,14 +455,6 @@ public class APIManager {
|
|||
return getFolderFeedMapping(false);
|
||||
}
|
||||
|
||||
public boolean checkForFolders() {
|
||||
final APIClient client = new APIClient(context);
|
||||
final APIResponse response = client.get(APIConstants.URL_FEEDS);
|
||||
FeedFolderResponse feedUpdate = gson.fromJson(response.responseString, FeedFolderResponse.class);
|
||||
return (feedUpdate.folders.entrySet().size() > 1);
|
||||
}
|
||||
|
||||
|
||||
public boolean getFolderFeedMapping(boolean doUpdateCounts) {
|
||||
|
||||
final APIClient client = new APIClient(context);
|
||||
|
|
Loading…
Add table
Reference in a new issue