mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Restructured data folder
This commit is contained in:
parent
648f6ca9af
commit
a910beca51
@ -5,7 +5,7 @@ import android.net.ConnectivityManager;
|
|||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.BuildConfig;
|
import org.communiquons.android.comunic.client.BuildConfig;
|
||||||
import org.communiquons.android.comunic.client.data.Account.Account;
|
import org.communiquons.android.comunic.client.data.helpers.AccountHelper;
|
||||||
|
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -132,14 +132,14 @@ public class APIRequest {
|
|||||||
private void addLoginTokens(APIRequestParameters params){
|
private void addLoginTokens(APIRequestParameters params){
|
||||||
|
|
||||||
//Create account object
|
//Create account object
|
||||||
Account account = new Account(params.getContext());
|
AccountHelper accountHelper = new AccountHelper(params.getContext());
|
||||||
|
|
||||||
//Check if user is signed in or not
|
//Check if user is signed in or not
|
||||||
if(!account.signed_in())
|
if(!accountHelper.signed_in())
|
||||||
return; //Do nothing
|
return; //Do nothing
|
||||||
|
|
||||||
//Get login tokens
|
//Get login tokens
|
||||||
ArrayList<String> tokens = account.getLoginTokens();
|
ArrayList<String> tokens = accountHelper.getLoginTokens();
|
||||||
|
|
||||||
if(tokens.size() < 2)
|
if(tokens.size() < 2)
|
||||||
return; //Not enough tokens
|
return; //Not enough tokens
|
||||||
|
@ -15,8 +15,8 @@ public final class DatabaseContract {
|
|||||||
public DatabaseContract(){}
|
public DatabaseContract(){}
|
||||||
|
|
||||||
/* Database basic information */
|
/* Database basic information */
|
||||||
static final int DATABASE_VERSION = 4;
|
public static final int DATABASE_VERSION = 4;
|
||||||
static final String DATABASE_NAME = "database.db";
|
public static final String DATABASE_NAME = "database.db";
|
||||||
|
|
||||||
/* Users info table */
|
/* Users info table */
|
||||||
public static abstract class UsersInfoSchema implements BaseColumns {
|
public static abstract class UsersInfoSchema implements BaseColumns {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.arrays;
|
||||||
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotifElemType;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Notif;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.arrays;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.comments.Comment;
|
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,24 +1,10 @@
|
|||||||
package org.communiquons.android.comunic.client.api;
|
package org.communiquons.android.comunic.client.data.asynctasks;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.net.ConnectivityManager;
|
|
||||||
import android.net.NetworkInfo;
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.Account.Account;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.BuildConfig;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import java.io.BufferedOutputStream;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.OutputStreamWriter;
|
|
||||||
import java.io.Reader;
|
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform an API request on the server
|
* Perform an API request on the server
|
@ -1,15 +1,12 @@
|
|||||||
package org.communiquons.android.comunic.client.data.UsersInfo;
|
package org.communiquons.android.comunic.client.data.asynctasks;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestTask;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.asynctasks;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -7,6 +7,7 @@ import android.os.AsyncTask;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.utils.ImageLoadUtils;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.likes;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Likes types
|
* Likes types
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifications elements type
|
* Notifications elements type
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum of the notifications types
|
* Enum of the notifications types
|
@ -1,7 +1,7 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifications visibility enum
|
* Notifications visibility enums
|
||||||
*
|
*
|
||||||
* @author Pierre HUBERT
|
* @author Pierre HUBERT
|
||||||
* Created by pierre on 4/9/18.
|
* Created by pierre on 4/9/18.
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page types
|
* Page types
|
@ -1,7 +1,7 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Posts types enum
|
* Posts types enums
|
||||||
*
|
*
|
||||||
* @author Pierre HUBERT
|
* @author Pierre HUBERT
|
||||||
* Created by pierre on 1/28/18.
|
* Created by pierre on 1/28/18.
|
@ -1,7 +1,7 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post users access enum
|
* Post users access enums
|
||||||
*
|
*
|
||||||
* @author Pierre HUBERT
|
* @author Pierre HUBERT
|
||||||
* Created by pierre on 3/25/18.
|
* Created by pierre on 3/25/18.
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.enums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post visibility levels
|
* Post visibility levels
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.Account;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -19,7 +19,7 @@ import java.util.Objects;
|
|||||||
* Created by pierre on 10/29/17.
|
* Created by pierre on 10/29/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Account {
|
public class AccountHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utilities object
|
* Utilities object
|
||||||
@ -46,7 +46,7 @@ public class Account {
|
|||||||
*
|
*
|
||||||
* @param context Context of the application
|
* @param context Context of the application
|
||||||
*/
|
*/
|
||||||
public Account(Context context){
|
public AccountHelper(Context context){
|
||||||
mContext = context;
|
mContext = context;
|
||||||
utils = new Utilities(context);
|
utils = new Utilities(context);
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.comments;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
@ -7,6 +7,7 @@ import android.support.annotation.Nullable;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
@ -1,14 +1,13 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsMessagesSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsMessagesSchema;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.ConversationMessage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
@ -7,7 +7,7 @@ import android.util.Log;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.ConversationMessage;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@ -55,7 +55,7 @@ public class ConversationMessagesHelper {
|
|||||||
* @param conversation_id The ID of the conversation to refresh
|
* @param conversation_id The ID of the conversation to refresh
|
||||||
* @return TRUE in case of success / FALSE else
|
* @return TRUE in case of success / FALSE else
|
||||||
*/
|
*/
|
||||||
boolean refresh_conversation(int conversation_id){
|
public boolean refresh_conversation(int conversation_id){
|
||||||
|
|
||||||
//Get the ID of the last message available in the database
|
//Get the ID of the last message available in the database
|
||||||
int last_message_id = getLastIDFromDb(conversation_id);
|
int last_message_id = getLastIDFromDb(conversation_id);
|
||||||
@ -116,7 +116,7 @@ public class ConversationMessagesHelper {
|
|||||||
* @return The message of the interval, or null in case of failure
|
* @return The message of the interval, or null in case of failure
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
ArrayList<ConversationMessage> getInDb(int conv, int start, int end){
|
public ArrayList<ConversationMessage> getInDb(int conv, int start, int end){
|
||||||
|
|
||||||
return mDbHelper.getInterval(conv, start, end);
|
return mDbHelper.getInterval(conv, start, end);
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ public class ConversationMessagesHelper {
|
|||||||
* @param conversation_id Target conversation
|
* @param conversation_id Target conversation
|
||||||
* @return The ID of the last message available in the database or 0 in case of failure
|
* @return The ID of the last message available in the database or 0 in case of failure
|
||||||
*/
|
*/
|
||||||
int getLastIDFromDb(int conversation_id){
|
public int getLastIDFromDb(int conversation_id){
|
||||||
|
|
||||||
//Get the id of the last message available in the database
|
//Get the id of the last message available in the database
|
||||||
ConversationMessage last_message = mDbHelper.getLast(conversation_id);
|
ConversationMessage last_message = mDbHelper.getLast(conversation_id);
|
@ -1,14 +1,13 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsListSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsListSchema;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
@ -9,10 +9,9 @@ import android.util.Log;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
|
||||||
import org.communiquons.android.comunic.client.data.utils.ArrayUtils;
|
import org.communiquons.android.comunic.client.data.utils.ArrayUtils;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
@ -1,9 +1,10 @@
|
|||||||
package org.communiquons.android.comunic.client.data;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
import android.database.sqlite.SQLiteOpenHelper;
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.DatabaseContract;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.FriendsListSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.FriendsListSchema;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.UsersInfoSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.UsersInfoSchema;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsListSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.ConversationsListSchema;
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
@ -6,8 +6,8 @@ import android.database.sqlite.SQLiteDatabase;
|
|||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.FriendsListSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.FriendsListSchema;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Friend;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
@ -7,7 +7,7 @@ import android.util.Log;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.Friend;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ public class FriendsListHelper {
|
|||||||
* @return The list of friend of the user
|
* @return The list of friend of the user
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
ArrayList<Friend> download(){
|
public ArrayList<Friend> download(){
|
||||||
|
|
||||||
//Prepare the API request
|
//Prepare the API request
|
||||||
APIRequestParameters params = new APIRequestParameters(mContext, "friends/getList");
|
APIRequestParameters params = new APIRequestParameters(mContext, "friends/getList");
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.UsersInfo;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
@ -9,7 +9,8 @@ import android.util.Log;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.AdvancedUserInfo;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
@ -1,18 +1,20 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.runnables.ImageLoadRunnable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Image load manager
|
* Image load manager / helper
|
||||||
*
|
*
|
||||||
* @author Pierre HUBERT
|
* @author Pierre HUBERT
|
||||||
* Created by pierre on 11/18/17.
|
* Created by pierre on 11/18/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ImageLoadManager {
|
public class ImageLoadHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of running operations
|
* The list of running operations
|
@ -1,10 +1,11 @@
|
|||||||
package org.communiquons.android.comunic.client.data.likes;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.LikesType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Likes Helper
|
* Likes Helper
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
@ -6,6 +6,12 @@ import android.support.annotation.Nullable;
|
|||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Notif;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotifElemType;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotificationTypes;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotificationVisibility;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.NotificationsCount;
|
||||||
|
import org.communiquons.android.comunic.client.data.arrays.NotifsList;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
@ -1,13 +1,18 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.comments.CommentsHelper;
|
import org.communiquons.android.comunic.client.data.models.CreatePost;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PageType;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostTypes;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostUserAccess;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostVisibilityLevels;
|
||||||
|
import org.communiquons.android.comunic.client.data.arrays.PostsList;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
@ -1,11 +1,11 @@
|
|||||||
package org.communiquons.android.comunic.client.data.UsersInfo;
|
package org.communiquons.android.comunic.client.data.helpers;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseContract.UsersInfoSchema;
|
import org.communiquons.android.comunic.client.data.DatabaseContract.UsersInfoSchema;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Users information helpers
|
* Users information helpers
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.UsersInfo;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advanced informations about a single user
|
* Advanced informations about a single user
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.comments;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
@ -47,7 +47,7 @@ public class ConversationMessage {
|
|||||||
*
|
*
|
||||||
* @param conversation_id The ID of the conversation
|
* @param conversation_id The ID of the conversation
|
||||||
*/
|
*/
|
||||||
void setConversation_id(int conversation_id) {
|
public void setConversation_id(int conversation_id) {
|
||||||
this.conversation_id = conversation_id;
|
this.conversation_id = conversation_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ public class ConversationMessage {
|
|||||||
*
|
*
|
||||||
* @param user_id The ID of the user
|
* @param user_id The ID of the user
|
||||||
*/
|
*/
|
||||||
void setUser_id(int user_id) {
|
public void setUser_id(int user_id) {
|
||||||
this.user_id = user_id;
|
this.user_id = user_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ public class ConversationMessage {
|
|||||||
*
|
*
|
||||||
* @param time_insert The time of insertion of the message
|
* @param time_insert The time of insertion of the message
|
||||||
*/
|
*/
|
||||||
void setTime_insert(int time_insert) {
|
public void setTime_insert(int time_insert) {
|
||||||
this.time_insert = time_insert;
|
this.time_insert = time_insert;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -38,7 +38,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param ID The ID of the conversation
|
* @param ID The ID of the conversation
|
||||||
*/
|
*/
|
||||||
void setID(int ID) {
|
public void setID(int ID) {
|
||||||
this.ID = ID;
|
this.ID = ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param ID_owner The ID of the owner of the conversation
|
* @param ID_owner The ID of the owner of the conversation
|
||||||
*/
|
*/
|
||||||
void setID_owner(int ID_owner) {
|
public void setID_owner(int ID_owner) {
|
||||||
this.ID_owner = ID_owner;
|
this.ID_owner = ID_owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param last_active The timestamp of the last activity of the conversation
|
* @param last_active The timestamp of the last activity of the conversation
|
||||||
*/
|
*/
|
||||||
void setLast_active(int last_active) {
|
public void setLast_active(int last_active) {
|
||||||
this.last_active = last_active;
|
this.last_active = last_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param following True if the user is following the conversation
|
* @param following True if the user is following the conversation
|
||||||
*/
|
*/
|
||||||
void setFollowing(boolean following) {
|
public void setFollowing(boolean following) {
|
||||||
this.following = following;
|
this.following = following;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param saw_last_message True if the user has seen the last message of the conversation
|
* @param saw_last_message True if the user has seen the last message of the conversation
|
||||||
*/
|
*/
|
||||||
void setSaw_last_message(boolean saw_last_message) {
|
public void setSaw_last_message(boolean saw_last_message) {
|
||||||
this.saw_last_message = saw_last_message;
|
this.saw_last_message = saw_last_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ public class ConversationsInfo {
|
|||||||
*
|
*
|
||||||
* @param id The ID of the member to add
|
* @param id The ID of the member to add
|
||||||
*/
|
*/
|
||||||
void addMember(Integer id){
|
public void addMember(Integer id){
|
||||||
if(members == null)
|
if(members == null)
|
||||||
members = new ArrayList<>();
|
members = new ArrayList<>();
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This object extends the Post object in order to include all the required informations to
|
* This object extends the Post object in order to include all the required informations to
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
@ -1,6 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class contains information about a friend but also about user himself
|
* This class contains information about a friend but also about user himself
|
@ -1,4 +1,8 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotifElemType;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotificationTypes;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.NotificationVisibility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notification object
|
* Notification object
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.notifications;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifications count service
|
* Notifications count service
|
@ -1,8 +1,11 @@
|
|||||||
package org.communiquons.android.comunic.client.data.posts;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.comments.Comment;
|
import org.communiquons.android.comunic.client.data.enums.PageType;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostTypes;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostUserAccess;
|
||||||
|
import org.communiquons.android.comunic.client.data.enums.PostVisibilityLevels;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -62,7 +65,7 @@ public class Post {
|
|||||||
|
|
||||||
|
|
||||||
//Set and get the post creation time
|
//Set and get the post creation time
|
||||||
void setPost_time(int post_time) {
|
public void setPost_time(int post_time) {
|
||||||
this.post_time = post_time;
|
this.post_time = post_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +122,7 @@ public class Post {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set and get comments list
|
//Set and get comments list
|
||||||
void setComments_list(ArrayList<Comment> comments_list) {
|
public void setComments_list(ArrayList<Comment> comments_list) {
|
||||||
this.comments_list = comments_list;
|
this.comments_list = comments_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +132,7 @@ public class Post {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set and post user access level
|
//Set and post user access level
|
||||||
void setUser_access_level(PostUserAccess user_access_level) {
|
public void setUser_access_level(PostUserAccess user_access_level) {
|
||||||
this.user_access_level = user_access_level;
|
this.user_access_level = user_access_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +180,7 @@ public class Post {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Set and get file path url
|
//Set and get file path url
|
||||||
void setFile_path_url(String file_path_url) {
|
public void setFile_path_url(String file_path_url) {
|
||||||
this.file_path_url = file_path_url;
|
this.file_path_url = file_path_url;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.UsersInfo;
|
package org.communiquons.android.comunic.client.data.models;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
@ -1,9 +1,12 @@
|
|||||||
package org.communiquons.android.comunic.client.data.conversations;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.helpers.ConversationMessagesHelper;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.ConversationMessage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,9 +1,9 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically refresh friends list thread
|
* Automatically refresh friends list thread
|
@ -1,8 +1,11 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
|
import org.communiquons.android.comunic.client.data.helpers.FriendsListDbHelper;
|
||||||
|
import org.communiquons.android.comunic.client.data.helpers.FriendsListHelper;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Friend;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.utils.BitmapUtils;
|
import org.communiquons.android.comunic.client.ui.utils.BitmapUtils;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.support.annotation.UiThread;
|
import android.support.annotation.UiThread;
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.runnables;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -7,6 +7,8 @@ import android.util.ArrayMap;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import org.communiquons.android.comunic.client.data.utils.ImageLoadUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
|
||||||
@ -20,7 +22,7 @@ import java.io.FileInputStream;
|
|||||||
* Created by pierre on 11/18/17.
|
* Created by pierre on 11/18/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ImageLoadRunnable implements Runnable {
|
public class ImageLoadRunnable implements Runnable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug tag
|
* Debug tag
|
||||||
@ -59,7 +61,7 @@ class ImageLoadRunnable implements Runnable {
|
|||||||
* @param imageView The imageView of the image
|
* @param imageView The imageView of the image
|
||||||
* @param url The URL of the image
|
* @param url The URL of the image
|
||||||
*/
|
*/
|
||||||
ImageLoadRunnable(Context context, ImageView imageView, String url){
|
public ImageLoadRunnable(Context context, ImageView imageView, String url){
|
||||||
|
|
||||||
//Check if the list of pending operations has to be initialized or not
|
//Check if the list of pending operations has to be initialized or not
|
||||||
if(pendingOperation == null)
|
if(pendingOperation == null)
|
@ -10,9 +10,9 @@ import android.support.annotation.Nullable;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.Account;
|
import org.communiquons.android.comunic.client.data.helpers.AccountHelper;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.NotificationsCount;
|
import org.communiquons.android.comunic.client.data.models.NotificationsCount;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.NotificationsHelper;
|
import org.communiquons.android.comunic.client.data.helpers.NotificationsHelper;
|
||||||
import org.communiquons.android.comunic.client.data.utils.PreferencesUtils;
|
import org.communiquons.android.comunic.client.data.utils.PreferencesUtils;
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ public class NotificationsService extends IntentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check if the user is signed in or not
|
//Check if the user is signed in or not
|
||||||
if(!new Account(this).signed_in()){
|
if(!new AccountHelper(this).signed_in()){
|
||||||
Log.v(TAG, "Skip notifications refresh because the user is not signed in.");
|
Log.v(TAG, "Skip notifications refresh because the user is not signed in.");
|
||||||
removeNotification();
|
removeNotification();
|
||||||
continue;
|
continue;
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package org.communiquons.android.comunic.client.data.Account;
|
package org.communiquons.android.comunic.client.data.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
import org.communiquons.android.comunic.client.api.APIRequestParameters;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequestTask;
|
import org.communiquons.android.comunic.client.data.asynctasks.APIRequestTask;
|
||||||
import org.communiquons.android.comunic.client.api.APIResponse;
|
import org.communiquons.android.comunic.client.api.APIResponse;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,8 +1,10 @@
|
|||||||
package org.communiquons.android.comunic.client.data.friendsList;
|
package org.communiquons.android.comunic.client.data.utils;
|
||||||
|
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.Friend;
|
||||||
|
import org.communiquons.android.comunic.client.data.models.FriendUser;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -38,7 +40,7 @@ public class FriendsUtils {
|
|||||||
* @return The result of the operation
|
* @return The result of the operation
|
||||||
*/
|
*/
|
||||||
public static ArrayList<FriendUser> merge_friends_user_infos_list(ArrayList<Friend> friendsList,
|
public static ArrayList<FriendUser> merge_friends_user_infos_list(ArrayList<Friend> friendsList,
|
||||||
ArrayMap<Integer, UserInfo> userInfos){
|
ArrayMap<Integer, UserInfo> userInfos){
|
||||||
|
|
||||||
ArrayList<FriendUser> list = new ArrayList<>();
|
ArrayList<FriendUser> list = new ArrayList<>();
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.ImageLoad;
|
package org.communiquons.android.comunic.client.data.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@ -14,7 +14,7 @@ import java.io.File;
|
|||||||
* Created by pierre on 11/18/17.
|
* Created by pierre on 11/18/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ImageLoadUtils {
|
public class ImageLoadUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug tag
|
* Debug tag
|
||||||
@ -24,7 +24,7 @@ class ImageLoadUtils {
|
|||||||
/**
|
/**
|
||||||
* The main folder in the cache directory that stores the file
|
* The main folder in the cache directory that stores the file
|
||||||
*/
|
*/
|
||||||
static final String IMAGE_CACHE_DIRECTORY = "img_cache/";
|
public static final String IMAGE_CACHE_DIRECTORY = "img_cache/";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the file name, based on the URL name
|
* Get the file name, based on the URL name
|
||||||
@ -32,7 +32,7 @@ class ImageLoadUtils {
|
|||||||
* @param url The URL of the file
|
* @param url The URL of the file
|
||||||
* @return The name of the file, composed of characters that can be used in filename
|
* @return The name of the file, composed of characters that can be used in filename
|
||||||
*/
|
*/
|
||||||
static String get_file_name(String url){
|
public static String get_file_name(String url){
|
||||||
return Utilities.sha1(url);
|
return Utilities.sha1(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ class ImageLoadUtils {
|
|||||||
* @param context Context of execution
|
* @param context Context of execution
|
||||||
* @return True in case of success
|
* @return True in case of success
|
||||||
*/
|
*/
|
||||||
static boolean create_parent_directory(Context context){
|
public static boolean create_parent_directory(Context context){
|
||||||
File parent = new File(context.getCacheDir(), IMAGE_CACHE_DIRECTORY);
|
File parent = new File(context.getCacheDir(), IMAGE_CACHE_DIRECTORY);
|
||||||
|
|
||||||
//Check if parent directory already exists
|
//Check if parent directory already exists
|
@ -11,8 +11,9 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.Account;
|
import org.communiquons.android.comunic.client.data.asynctasks.APIRequestTask;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.helpers.AccountHelper;
|
||||||
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@ -161,8 +162,8 @@ public class LoginActivity extends AppCompatActivity {
|
|||||||
tokens.add(tokensObj.getString("token2"));
|
tokens.add(tokensObj.getString("token2"));
|
||||||
|
|
||||||
//Save tokens
|
//Save tokens
|
||||||
Account account = new Account(this);
|
AccountHelper accountHelper = new AccountHelper(this);
|
||||||
if(!account.save_new_tokens(tokens)) {
|
if(!accountHelper.save_new_tokens(tokens)) {
|
||||||
show_err_server_response();
|
show_err_server_response();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import android.content.DialogInterface;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceFragment;
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.BottomNavigationView;
|
import android.support.design.widget.BottomNavigationView;
|
||||||
@ -18,14 +17,14 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.api.APIRequest;
|
import org.communiquons.android.comunic.client.api.APIRequest;
|
||||||
import org.communiquons.android.comunic.client.data.Account.Account;
|
import org.communiquons.android.comunic.client.data.helpers.AccountHelper;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.FriendRefreshLoopRunnable;
|
import org.communiquons.android.comunic.client.data.runnables.FriendRefreshLoopRunnable;
|
||||||
import org.communiquons.android.comunic.client.data.services.NotificationsService;
|
import org.communiquons.android.comunic.client.data.services.NotificationsService;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
import org.communiquons.android.comunic.client.ui.fragments.ConversationFragment;
|
import org.communiquons.android.comunic.client.ui.fragments.ConversationFragment;
|
||||||
import org.communiquons.android.comunic.client.ui.fragments.ConversationsListFragment;
|
import org.communiquons.android.comunic.client.ui.fragments.ConversationsListFragment;
|
||||||
import org.communiquons.android.comunic.client.ui.fragments.FriendsListFragment;
|
import org.communiquons.android.comunic.client.ui.fragments.FriendsListFragment;
|
||||||
@ -54,7 +53,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
/**
|
/**
|
||||||
* Account object
|
* Account object
|
||||||
*/
|
*/
|
||||||
private Account account;
|
private AccountHelper accountHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account utils object
|
* Account utils object
|
||||||
@ -86,10 +85,10 @@ public class MainActivity extends AppCompatActivity
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
//Initialize account objects
|
//Initialize account objects
|
||||||
account = new Account(this);
|
accountHelper = new AccountHelper(this);
|
||||||
|
|
||||||
//Check if user is signed in or not
|
//Check if user is signed in or not
|
||||||
if(!account.signed_in()){
|
if(!accountHelper.signed_in()){
|
||||||
//Open the login activity
|
//Open the login activity
|
||||||
startActivity(new Intent(this, LoginActivity.class));
|
startActivity(new Intent(this, LoginActivity.class));
|
||||||
return;
|
return;
|
||||||
@ -123,7 +122,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
//Check if user is signed in or not
|
//Check if user is signed in or not
|
||||||
if(!account.signed_in()){
|
if(!accountHelper.signed_in()){
|
||||||
//Open the login activity
|
//Open the login activity
|
||||||
startActivity(new Intent(this, LoginActivity.class));
|
startActivity(new Intent(this, LoginActivity.class));
|
||||||
return;
|
return;
|
||||||
@ -253,7 +252,7 @@ public class MainActivity extends AppCompatActivity
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
|
||||||
//Sign out user
|
//Sign out user
|
||||||
account.sign_out();
|
accountHelper.sign_out();
|
||||||
|
|
||||||
//Redirect to login activity
|
//Redirect to login activity
|
||||||
startActivity(new Intent(MainActivity.this, LoginActivity.class));
|
startActivity(new Intent(MainActivity.this, LoginActivity.class));
|
||||||
|
@ -16,10 +16,10 @@ import android.widget.ListView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.UsersBasicAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.UsersBasicAdapter;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -2,23 +2,18 @@ package org.communiquons.android.comunic.client.ui.adapters;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.view.ContextMenu;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||||
import org.communiquons.android.comunic.client.data.comments.Comment;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
import org.communiquons.android.comunic.client.data.comments.CommentsHelper;
|
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
|
||||||
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -86,7 +81,7 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
|
|||||||
R.drawable.default_account_image));
|
R.drawable.default_account_image));
|
||||||
accountName.setText("");
|
accountName.setText("");
|
||||||
} else {
|
} else {
|
||||||
ImageLoadManager.load(context, user.getAcountImageURL(), accountImage);
|
ImageLoadHelper.load(context, user.getAcountImageURL(), accountImage);
|
||||||
accountName.setText(user.getDisplayFullName());
|
accountName.setText(user.getDisplayFullName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,8 +94,8 @@ class CommentsAdapter extends ArrayAdapter<Comment> {
|
|||||||
commentImage.setVisibility(View.GONE);
|
commentImage.setVisibility(View.GONE);
|
||||||
else {
|
else {
|
||||||
commentImage.setVisibility(View.VISIBLE);
|
commentImage.setVisibility(View.VISIBLE);
|
||||||
ImageLoadManager.remove(commentImage);
|
ImageLoadHelper.remove(commentImage);
|
||||||
ImageLoadManager.load(context, comment.getImage_url(), commentImage);
|
ImageLoadHelper.load(context, comment.getImage_url(), commentImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import android.content.Context;
|
|||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -15,10 +14,10 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationMessage;
|
import org.communiquons.android.comunic.client.data.models.ConversationMessage;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -181,8 +180,8 @@ public class ConversationMessageAdapter extends ArrayAdapter<ConversationMessage
|
|||||||
*/
|
*/
|
||||||
if(message.hasImage()){
|
if(message.hasImage()){
|
||||||
//Load the image
|
//Load the image
|
||||||
ImageLoadManager.remove(messageImageView);
|
ImageLoadHelper.remove(messageImageView);
|
||||||
ImageLoadManager.load(getContext(), message.getImage_path(), messageImageView);
|
ImageLoadHelper.load(getContext(), message.getImage_path(), messageImageView);
|
||||||
|
|
||||||
//Make the image visible
|
//Make the image visible
|
||||||
messageImageView.setVisibility(View.VISIBLE);
|
messageImageView.setVisibility(View.VISIBLE);
|
||||||
@ -219,7 +218,7 @@ public class ConversationMessageAdapter extends ArrayAdapter<ConversationMessage
|
|||||||
Update account image
|
Update account image
|
||||||
*/
|
*/
|
||||||
//Cancel any load pending operation
|
//Cancel any load pending operation
|
||||||
ImageLoadManager.remove(accountImageView);
|
ImageLoadHelper.remove(accountImageView);
|
||||||
|
|
||||||
//Set the default image
|
//Set the default image
|
||||||
accountImageView.setImageResource(R.drawable.default_account_image);
|
accountImageView.setImageResource(R.drawable.default_account_image);
|
||||||
@ -228,7 +227,7 @@ public class ConversationMessageAdapter extends ArrayAdapter<ConversationMessage
|
|||||||
//Check if we can load a specific image
|
//Check if we can load a specific image
|
||||||
if(user != null) {
|
if(user != null) {
|
||||||
String imageURL = user.getAcountImageURL();
|
String imageURL = user.getAcountImageURL();
|
||||||
ImageLoadManager.load(getContext(), imageURL, accountImageView);
|
ImageLoadHelper.load(getContext(), imageURL, accountImageView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import android.widget.ArrayAdapter;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsInfo;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -12,8 +12,8 @@ import android.widget.ImageView;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.FriendUser;
|
import org.communiquons.android.comunic.client.data.models.FriendUser;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
import org.communiquons.android.comunic.client.ui.fragments.FriendsListFragment;
|
import org.communiquons.android.comunic.client.ui.fragments.FriendsListFragment;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ public class FriendsAdapter extends ArrayAdapter<FriendUser> {
|
|||||||
//Update user account image
|
//Update user account image
|
||||||
ImageView user_image = listItemView.findViewById(R.id.fragment_friendslist_item_accountimage);
|
ImageView user_image = listItemView.findViewById(R.id.fragment_friendslist_item_accountimage);
|
||||||
user_image.setImageDrawable(getContext().getDrawable(R.drawable.default_account_image));
|
user_image.setImageDrawable(getContext().getDrawable(R.drawable.default_account_image));
|
||||||
ImageLoadManager.load(getContext(), friendUser.getUserInfo().getAcountImageURL(), user_image);
|
ImageLoadHelper.load(getContext(), friendUser.getUserInfo().getAcountImageURL(), user_image);
|
||||||
|
|
||||||
//Update user name
|
//Update user name
|
||||||
TextView user_name = listItemView.findViewById(R.id.fragment_friendslist_item_fullname);
|
TextView user_name = listItemView.findViewById(R.id.fragment_friendslist_item_fullname);
|
||||||
|
@ -12,10 +12,10 @@ import android.widget.ImageView;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.Notif;
|
import org.communiquons.android.comunic.client.data.models.Notif;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.NotifsList;
|
import org.communiquons.android.comunic.client.data.arrays.NotifsList;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,8 +68,8 @@ public class NotificationsAdapter extends ArrayAdapter<Notif>{
|
|||||||
|
|
||||||
//Update the user account image
|
//Update the user account image
|
||||||
ImageView image = convertView.findViewById(R.id.user_account_image);
|
ImageView image = convertView.findViewById(R.id.user_account_image);
|
||||||
ImageLoadManager.remove(image);
|
ImageLoadHelper.remove(image);
|
||||||
ImageLoadManager.load(getContext(),
|
ImageLoadHelper.load(getContext(),
|
||||||
mUsersInfo.get(notif.getFrom_user_id()).getAcountImageURL(), image);
|
mUsersInfo.get(notif.getFrom_user_id()).getAcountImageURL(), image);
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,19 +8,18 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.comments.Comment;
|
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||||
import org.communiquons.android.comunic.client.data.posts.Post;
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostTypes;
|
import org.communiquons.android.comunic.client.data.enums.PostTypes;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsList;
|
import org.communiquons.android.comunic.client.data.arrays.PostsList;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
import org.communiquons.android.comunic.client.data.utils.Utilities;
|
||||||
import org.communiquons.android.comunic.client.ui.views.EditCommentContentView;
|
import org.communiquons.android.comunic.client.ui.views.EditCommentContentView;
|
||||||
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
import org.communiquons.android.comunic.client.ui.views.LikeButtonView;
|
||||||
@ -101,14 +100,14 @@ public class PostsAdapter extends ArrayAdapter<Post>{
|
|||||||
|
|
||||||
//Reset user information
|
//Reset user information
|
||||||
userAccountName.setText("");
|
userAccountName.setText("");
|
||||||
ImageLoadManager.remove(userAccountImage);
|
ImageLoadHelper.remove(userAccountImage);
|
||||||
userAccountImage.setImageDrawable(UiUtils.getDrawable(getContext(),
|
userAccountImage.setImageDrawable(UiUtils.getDrawable(getContext(),
|
||||||
R.drawable.default_account_image));
|
R.drawable.default_account_image));
|
||||||
|
|
||||||
//Set user information if available
|
//Set user information if available
|
||||||
if(userInfo != null){
|
if(userInfo != null){
|
||||||
userAccountName.setText(userInfo.getDisplayFullName());
|
userAccountName.setText(userInfo.getDisplayFullName());
|
||||||
ImageLoadManager.load(getContext(), userInfo.getAcountImageURL(), userAccountImage);
|
ImageLoadHelper.load(getContext(), userInfo.getAcountImageURL(), userAccountImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -152,14 +151,14 @@ public class PostsAdapter extends ArrayAdapter<Post>{
|
|||||||
ImageView postImage = convertView.findViewById(R.id.post_image);
|
ImageView postImage = convertView.findViewById(R.id.post_image);
|
||||||
postImage.setVisibility(View.GONE);
|
postImage.setVisibility(View.GONE);
|
||||||
postImage.setImageDrawable(null);
|
postImage.setImageDrawable(null);
|
||||||
ImageLoadManager.remove(postImage);
|
ImageLoadHelper.remove(postImage);
|
||||||
if(post.getType() == PostTypes.IMAGE){
|
if(post.getType() == PostTypes.IMAGE){
|
||||||
|
|
||||||
//Make image visible
|
//Make image visible
|
||||||
postImage.setVisibility(View.VISIBLE);
|
postImage.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
//Load image
|
//Load image
|
||||||
ImageLoadManager.load(getContext(), post.getFile_path_url(), postImage);
|
ImageLoadHelper.load(getContext(), post.getFile_path_url(), postImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set posts likes
|
//Set posts likes
|
||||||
|
@ -13,9 +13,9 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public class UsersAsysncInfoAdapter extends ArrayAdapter<Integer> {
|
|||||||
TextView account_name = convertView.findViewById(R.id.user_name);
|
TextView account_name = convertView.findViewById(R.id.user_name);
|
||||||
|
|
||||||
//Empty the entry
|
//Empty the entry
|
||||||
ImageLoadManager.remove(account_image);
|
ImageLoadHelper.remove(account_image);
|
||||||
account_image.setImageDrawable(UiUtils.getDrawable(getContext(),
|
account_image.setImageDrawable(UiUtils.getDrawable(getContext(),
|
||||||
R.drawable.default_account_image));
|
R.drawable.default_account_image));
|
||||||
account_name.setText("");
|
account_name.setText("");
|
||||||
@ -78,7 +78,7 @@ public class UsersAsysncInfoAdapter extends ArrayAdapter<Integer> {
|
|||||||
UserInfo user = usersInfos.get(userID);
|
UserInfo user = usersInfos.get(userID);
|
||||||
|
|
||||||
account_name.setText(user.getDisplayFullName());
|
account_name.setText(user.getDisplayFullName());
|
||||||
ImageLoadManager.load(getContext(), user.getAcountImageURL(), account_image);
|
ImageLoadHelper.load(getContext(), user.getAcountImageURL(), account_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
|
@ -11,12 +11,11 @@ import android.widget.ImageView;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.zip.Inflater;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User basic adapter
|
* User basic adapter
|
||||||
@ -59,10 +58,10 @@ public class UsersBasicAdapter extends ArrayAdapter<UserInfo> {
|
|||||||
|
|
||||||
//Set account image
|
//Set account image
|
||||||
ImageView account_image = convertView.findViewById(R.id.user_account_image);
|
ImageView account_image = convertView.findViewById(R.id.user_account_image);
|
||||||
ImageLoadManager.remove(account_image);
|
ImageLoadHelper.remove(account_image);
|
||||||
account_image.setImageDrawable(UiUtils.getDrawable(getContext(),
|
account_image.setImageDrawable(UiUtils.getDrawable(getContext(),
|
||||||
R.drawable.default_account_image));
|
R.drawable.default_account_image));
|
||||||
ImageLoadManager.load(getContext(), userInfos.getAcountImageURL(), account_image);
|
ImageLoadHelper.load(getContext(), userInfos.getAcountImageURL(), account_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
|
@ -24,17 +24,17 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationMessage;
|
import org.communiquons.android.comunic.client.data.models.ConversationMessage;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.ConversationMessageAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.ConversationMessageAdapter;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationMessagesHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationMessagesHelper;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationRefreshRunnable;
|
import org.communiquons.android.comunic.client.data.runnables.ConversationRefreshRunnable;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsInfo;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper;
|
||||||
import org.communiquons.android.comunic.client.data.utils.BitmapUtils;
|
import org.communiquons.android.comunic.client.ui.utils.BitmapUtils;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -21,15 +21,15 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsInfo;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.ConversationsListAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.ConversationsListAdapter;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper.openConversationListener;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper.openConversationListener;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper.updateConversationListener;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper.updateConversationListener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -20,15 +20,15 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.Friend;
|
import org.communiquons.android.comunic.client.data.models.Friend;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.FriendUser;
|
import org.communiquons.android.comunic.client.data.models.FriendUser;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.FriendsAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.FriendsAdapter;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.FriendsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.FriendsListHelper;
|
||||||
import org.communiquons.android.comunic.client.data.friendsList.FriendsUtils;
|
import org.communiquons.android.comunic.client.data.utils.FriendsUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -15,10 +15,9 @@ import android.widget.ProgressBar;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.NotificationsHelper;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.NotificationsHelper;
|
import org.communiquons.android.comunic.client.data.arrays.NotifsList;
|
||||||
import org.communiquons.android.comunic.client.data.notifications.NotifsList;
|
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.NotificationsAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.NotificationsAdapter;
|
||||||
|
|
||||||
|
@ -9,16 +9,15 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.posts.CreatePost;
|
import org.communiquons.android.comunic.client.data.models.CreatePost;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PageType;
|
import org.communiquons.android.comunic.client.data.enums.PageType;
|
||||||
import org.communiquons.android.comunic.client.data.posts.Post;
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostTypes;
|
import org.communiquons.android.comunic.client.data.enums.PostTypes;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostVisibilityLevels;
|
import org.communiquons.android.comunic.client.data.enums.PostVisibilityLevels;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsHelper;
|
import org.communiquons.android.comunic.client.data.helpers.PostsHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Posts creation form
|
* Posts creation form
|
||||||
|
@ -19,17 +19,17 @@ import android.widget.ListView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.comments.Comment;
|
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||||
import org.communiquons.android.comunic.client.data.comments.CommentsHelper;
|
import org.communiquons.android.comunic.client.data.helpers.CommentsHelper;
|
||||||
import org.communiquons.android.comunic.client.data.likes.LikesHelper;
|
import org.communiquons.android.comunic.client.data.helpers.LikesHelper;
|
||||||
import org.communiquons.android.comunic.client.data.likes.LikesType;
|
import org.communiquons.android.comunic.client.data.enums.LikesType;
|
||||||
import org.communiquons.android.comunic.client.data.posts.Post;
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsHelper;
|
import org.communiquons.android.comunic.client.data.helpers.PostsHelper;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsList;
|
import org.communiquons.android.comunic.client.data.arrays.PostsList;
|
||||||
import org.communiquons.android.comunic.client.data.utils.StringsUtils;
|
import org.communiquons.android.comunic.client.data.utils.StringsUtils;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.PostsAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.PostsAdapter;
|
||||||
import org.communiquons.android.comunic.client.ui.views.EditCommentContentView;
|
import org.communiquons.android.comunic.client.ui.views.EditCommentContentView;
|
||||||
|
@ -24,13 +24,13 @@ import android.widget.Toast;
|
|||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.ui.activities.SearchUserActivity;
|
import org.communiquons.android.comunic.client.ui.activities.SearchUserActivity;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.ui.adapters.UsersAsysncInfoAdapter;
|
import org.communiquons.android.comunic.client.ui.adapters.UsersAsysncInfoAdapter;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsInfo;
|
import org.communiquons.android.comunic.client.data.models.ConversationsInfo;
|
||||||
import org.communiquons.android.comunic.client.data.conversations.ConversationsListHelper;
|
import org.communiquons.android.comunic.client.data.helpers.ConversationsListHelper;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -14,11 +14,11 @@ import android.widget.Toast;
|
|||||||
|
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.Account.AccountUtils;
|
import org.communiquons.android.comunic.client.data.utils.AccountUtils;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadTask;
|
import org.communiquons.android.comunic.client.data.asynctasks.ImageLoadTask;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersInfos;
|
import org.communiquons.android.comunic.client.data.asynctasks.GetUsersInfos;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User informations fragment
|
* User informations fragment
|
||||||
|
@ -15,15 +15,15 @@ import android.widget.TextView;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.DatabaseHelper;
|
import org.communiquons.android.comunic.client.data.helpers.DatabaseHelper;
|
||||||
import org.communiquons.android.comunic.client.data.ImageLoad.ImageLoadManager;
|
import org.communiquons.android.comunic.client.data.helpers.ImageLoadHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.AdvancedUserInfo;
|
import org.communiquons.android.comunic.client.data.models.AdvancedUserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersHelper;
|
import org.communiquons.android.comunic.client.data.helpers.GetUsersHelper;
|
||||||
import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo;
|
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||||
import org.communiquons.android.comunic.client.data.posts.Post;
|
import org.communiquons.android.comunic.client.data.models.Post;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsHelper;
|
import org.communiquons.android.comunic.client.data.helpers.PostsHelper;
|
||||||
import org.communiquons.android.comunic.client.data.posts.PostsList;
|
import org.communiquons.android.comunic.client.data.arrays.PostsList;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
import org.communiquons.android.comunic.client.ui.activities.MainActivity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,8 +231,8 @@ public class UserPageFragment extends Fragment implements PostsCreateFormFragmen
|
|||||||
|
|
||||||
//Update user name and account image
|
//Update user name and account image
|
||||||
user_name.setText(userInfo.getDisplayFullName());
|
user_name.setText(userInfo.getDisplayFullName());
|
||||||
ImageLoadManager.remove(user_image);
|
ImageLoadHelper.remove(user_image);
|
||||||
ImageLoadManager.load(getActivity(), userInfo.getAcountImageURL(), user_image);
|
ImageLoadHelper.load(getActivity(), userInfo.getAcountImageURL(), user_image);
|
||||||
|
|
||||||
//Load the list of posts of the user
|
//Load the list of posts of the user
|
||||||
load_posts();
|
load_posts();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.utils;
|
package org.communiquons.android.comunic.client.ui.utils;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package org.communiquons.android.comunic.client.data.utils;
|
package org.communiquons.android.comunic.client.ui.utils;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
@ -12,7 +12,7 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.communiquons.android.comunic.client.R;
|
import org.communiquons.android.comunic.client.R;
|
||||||
import org.communiquons.android.comunic.client.data.utils.UiUtils;
|
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Like button view
|
* Like button view
|
||||||
|
Loading…
Reference in New Issue
Block a user