* This class is a fragment for a list screen used in the main activity by the page viewer for events, jobs, it will use the given page position to tell which one it is
* NOTE: This fragment will lose its connection to the parent activity, when the app is resumed, use MainActivity.instance as the activity and context
*/
publicclassListFragmentextendsFragment{
privateintpagePosition;//the fragments page in the pageview of the main activity
...
...
@@ -47,7 +48,7 @@ public class ListFragment extends Fragment {
session_etag=json.getString("session_etag");//if from a gson saved locally
elseif(isFromTokenRequest&&json.has("_etag"))
session_etag=json.getString("_etag");
if(isFromTokenRequest&&json.has("_id"))
if(json.has("session_id"))
session_id=json.getString("session_id");
elseif(isFromTokenRequest&&json.has("_id"))
session_id=json.getString("_id");
if(json.has("legi"))
...
...
@@ -77,15 +101,25 @@ public class UserInfo {
* Will safely update the current user or create it
* @param isFromTokenRequest This ensures the correct values are retrieved from the json. Set to true when the json is from a /sessions POST request, where the user ID is "user" not "_id" as usually