Better cache cleaner
This commit is contained in:
parent
121baec44c
commit
7d4dd6f27b
|
@ -139,6 +139,7 @@ import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.InstancesDAO;
|
import fr.gouv.etalab.mastodon.sqlite.InstancesDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.SearchDAO;
|
import fr.gouv.etalab.mastodon.sqlite.SearchDAO;
|
||||||
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
import fr.gouv.etalab.mastodon.sqlite.Sqlite;
|
||||||
|
import fr.gouv.etalab.mastodon.sqlite.StatusCacheDAO;
|
||||||
|
|
||||||
import static fr.gouv.etalab.mastodon.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER;
|
import static fr.gouv.etalab.mastodon.asynctasks.ManageFiltersAsyncTask.action.GET_ALL_FILTER;
|
||||||
import static fr.gouv.etalab.mastodon.helper.Helper.ADD_USER_INTENT;
|
import static fr.gouv.etalab.mastodon.helper.Helper.ADD_USER_INTENT;
|
||||||
|
@ -1207,48 +1208,63 @@ public abstract class BaseMainActivity extends BaseActivity
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_cache:
|
case R.id.action_cache:
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(BaseMainActivity.this, style);
|
|
||||||
builder.setTitle(R.string.cache_title);
|
new AsyncTask<Void, Void, Void>() {
|
||||||
long sizeCache = Helper.cacheSize(getCacheDir());
|
private float cacheSize;
|
||||||
float cacheSize = 0;
|
@Override
|
||||||
if( sizeCache > 0 ) {
|
protected Void doInBackground(Void... params) {
|
||||||
cacheSize = (float) sizeCache / 1000000.0f;
|
long sizeCache = Helper.cacheSize(getCacheDir().getParentFile());
|
||||||
}
|
cacheSize = 0;
|
||||||
final float finalCacheSize = cacheSize;
|
if( sizeCache > 0 ) {
|
||||||
builder.setMessage(getString(R.string.cache_message, String.format("%s %s", String.format(Locale.getDefault(), "%.2f", cacheSize), getString(R.string.cache_units))))
|
cacheSize = (float) sizeCache / 1000000.0f;
|
||||||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
}
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
return null;
|
||||||
// continue with delete
|
}
|
||||||
AsyncTask.execute(new Runnable() {
|
@Override
|
||||||
@Override
|
protected void onPostExecute(Void result){
|
||||||
public void run() {
|
AlertDialog.Builder builder = new AlertDialog.Builder(BaseMainActivity.this, style);
|
||||||
try {
|
builder.setTitle(R.string.cache_title);
|
||||||
String path = getCacheDir().getPath();
|
|
||||||
File dir = new File(path);
|
final float finalCacheSize = cacheSize;
|
||||||
if (dir.isDirectory()) {
|
builder.setMessage(getString(R.string.cache_message, String.format("%s %s", String.format(Locale.getDefault(), "%.2f", cacheSize), getString(R.string.cache_units))))
|
||||||
Helper.deleteDir(dir);
|
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
// continue with delete
|
||||||
|
AsyncTask.execute(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
String path = getCacheDir().getParentFile().getPath();
|
||||||
|
File dir = new File(path);
|
||||||
|
if (dir.isDirectory()) {
|
||||||
|
Helper.deleteDir(dir);
|
||||||
|
}
|
||||||
|
} catch (Exception ignored) {}
|
||||||
|
new StatusCacheDAO(BaseMainActivity.this, db).removeAllStatus(StatusCacheDAO.STATUS_CACHE);
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
});
|
||||||
|
Toast.makeText(BaseMainActivity.this, getString(R.string.toast_cache_clear,String.format("%s %s", String.format(Locale.getDefault(), "%.2f", finalCacheSize), getString(R.string.cache_units))), Toast.LENGTH_LONG).show();
|
||||||
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
Toast.makeText(BaseMainActivity.this, getString(R.string.toast_cache_clear,String.format("%s %s", String.format(Locale.getDefault(), "%.2f", finalCacheSize), getString(R.string.cache_units))), Toast.LENGTH_LONG).show();
|
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||||
dialog.dismiss();
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
}
|
dialog.dismiss();
|
||||||
})
|
}
|
||||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
})
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
dialog.dismiss();
|
.show();
|
||||||
}
|
}
|
||||||
})
|
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
|
||||||
.show();
|
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_size:
|
case R.id.action_size:
|
||||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
int textSize = sharedpreferences.getInt(Helper.SET_TEXT_SIZE,110);
|
int textSize = sharedpreferences.getInt(Helper.SET_TEXT_SIZE,110);
|
||||||
int iconSize = sharedpreferences.getInt(Helper.SET_ICON_SIZE,130);
|
int iconSize = sharedpreferences.getInt(Helper.SET_ICON_SIZE,130);
|
||||||
|
|
||||||
builder = new AlertDialog.Builder(BaseMainActivity.this, style);
|
AlertDialog.Builder builder = new AlertDialog.Builder(BaseMainActivity.this, style);
|
||||||
builder.setTitle(R.string.text_size);
|
builder.setTitle(R.string.text_size);
|
||||||
|
|
||||||
@SuppressLint("InflateParams") View popup_quick_settings = getLayoutInflater().inflate( R.layout.popup_text_size, null );
|
@SuppressLint("InflateParams") View popup_quick_settings = getLayoutInflater().inflate( R.layout.popup_text_size, null );
|
||||||
|
|
|
@ -17,6 +17,7 @@ package fr.gouv.etalab.mastodon.client;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -2474,39 +2475,47 @@ public class API {
|
||||||
try {
|
try {
|
||||||
card.setAuthor_name(resobj.get("author_name").toString());
|
card.setAuthor_name(resobj.get("author_name").toString());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setAuthor_name(null);
|
card.setAuthor_name(null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setAuthor_url(resobj.get("author_url").toString());
|
card.setAuthor_url(resobj.get("author_url").toString());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setAuthor_url(null);
|
card.setAuthor_url(null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setEmbed_url(resobj.get("embed_url").toString());
|
card.setEmbed_url(resobj.get("embed_url").toString());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setEmbed_url(null);
|
card.setEmbed_url(null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setProvider_name(resobj.get("provider_name").toString());
|
card.setProvider_name(resobj.get("provider_name").toString());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setProvider_name(null);
|
card.setProvider_name(null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setProvider_url(resobj.get("provider_url").toString());
|
card.setProvider_url(resobj.get("provider_url").toString());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setProvider_url(null);
|
card.setProvider_url(null);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setHeight(Integer.parseInt(resobj.get("height").toString()));
|
card.setHeight(Integer.parseInt(resobj.get("height").toString()));
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setHeight(0);
|
card.setHeight(0);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
card.setWidth(Integer.parseInt(resobj.get("width").toString()));
|
card.setWidth(Integer.parseInt(resobj.get("width").toString()));
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
card.setWidth(0);
|
card.setWidth(0);
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
card = null;
|
card = null;
|
||||||
}
|
}
|
||||||
return card;
|
return card;
|
||||||
|
@ -2876,8 +2885,9 @@ public class API {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
status.setCard(parseCardResponse(resobj.getJSONObject("card")));
|
status.setCard(parseCardResponse(resobj.getJSONObject("card")));
|
||||||
}catch (Exception e){status.setCard(null);}
|
}catch (Exception e){status.setCard(null); Log.v(Helper.TAG,"resobj: " + resobj);e.printStackTrace();}
|
||||||
|
|
||||||
|
|
||||||
status.setMedia_attachments(attachments);
|
status.setMedia_attachments(attachments);
|
||||||
|
|
|
@ -43,6 +43,17 @@ public class Card implements Parcelable {
|
||||||
|
|
||||||
public Card(){}
|
public Card(){}
|
||||||
|
|
||||||
|
public static final Creator<Card> CREATOR = new Creator<Card>() {
|
||||||
|
@Override
|
||||||
|
public Card createFromParcel(Parcel in) {
|
||||||
|
return new Card(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Card[] newArray(int size) {
|
||||||
|
return new Card[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
protected Card(Parcel in) {
|
protected Card(Parcel in) {
|
||||||
url = in.readString();
|
url = in.readString();
|
||||||
|
@ -60,17 +71,24 @@ public class Card implements Parcelable {
|
||||||
width = in.readInt();
|
width = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<Card> CREATOR = new Creator<Card>() {
|
@Override
|
||||||
@Override
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
public Card createFromParcel(Parcel in) {
|
dest.writeString(url);
|
||||||
return new Card(in);
|
dest.writeString(title);
|
||||||
}
|
dest.writeString(description);
|
||||||
|
dest.writeString(image);
|
||||||
|
dest.writeString(type);
|
||||||
|
dest.writeString(html);
|
||||||
|
dest.writeString(author_name);
|
||||||
|
dest.writeString(author_url);
|
||||||
|
dest.writeString(embed_url);
|
||||||
|
dest.writeString(provider_name);
|
||||||
|
dest.writeString(provider_url);
|
||||||
|
dest.writeInt(height);
|
||||||
|
dest.writeInt(width);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Card[] newArray(int size) {
|
|
||||||
return new Card[size];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return url;
|
return url;
|
||||||
|
@ -182,20 +200,5 @@ public class Card implements Parcelable {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
|
||||||
dest.writeString(url);
|
|
||||||
dest.writeString(title);
|
|
||||||
dest.writeString(description);
|
|
||||||
dest.writeString(image);
|
|
||||||
dest.writeString(type);
|
|
||||||
dest.writeString(html);
|
|
||||||
dest.writeString(author_name);
|
|
||||||
dest.writeString(author_url);
|
|
||||||
dest.writeString(embed_url);
|
|
||||||
dest.writeString(provider_name);
|
|
||||||
dest.writeString(provider_url);
|
|
||||||
dest.writeInt(height);
|
|
||||||
dest.writeInt(width);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@ import fr.gouv.etalab.mastodon.client.API;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Account;
|
import fr.gouv.etalab.mastodon.client.Entities.Account;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Application;
|
import fr.gouv.etalab.mastodon.client.Entities.Application;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Attachment;
|
import fr.gouv.etalab.mastodon.client.Entities.Attachment;
|
||||||
|
import fr.gouv.etalab.mastodon.client.Entities.Card;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Emojis;
|
import fr.gouv.etalab.mastodon.client.Entities.Emojis;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Filters;
|
import fr.gouv.etalab.mastodon.client.Entities.Filters;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Mention;
|
import fr.gouv.etalab.mastodon.client.Entities.Mention;
|
||||||
|
@ -1570,9 +1571,11 @@ public class Helper {
|
||||||
if (dir != null && dir.isDirectory()) {
|
if (dir != null && dir.isDirectory()) {
|
||||||
String[] children = dir.list();
|
String[] children = dir.list();
|
||||||
for (String aChildren : children) {
|
for (String aChildren : children) {
|
||||||
boolean success = deleteDir(new File(dir, aChildren));
|
if (!aChildren.equals("databases") && !aChildren.equals("shared_prefs")) {
|
||||||
if (!success) {
|
boolean success = deleteDir(new File(dir, aChildren));
|
||||||
return false;
|
if (!success) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dir.delete();
|
return dir.delete();
|
||||||
|
@ -1913,6 +1916,30 @@ public class Helper {
|
||||||
return gson.toJson(status);
|
return gson.toJson(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unserialized a Card
|
||||||
|
* @param serializedCard String serialized card
|
||||||
|
* @return Card
|
||||||
|
*/
|
||||||
|
public static Card restoreCardFromString(String serializedCard){
|
||||||
|
Gson gson = new Gson();
|
||||||
|
try {
|
||||||
|
return gson.fromJson(serializedCard, Card.class);
|
||||||
|
}catch (Exception e){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serialized a Card class
|
||||||
|
* @param card Card to serialize
|
||||||
|
* @return String serialized Status
|
||||||
|
*/
|
||||||
|
public static String cardToStringStorage(Card card){
|
||||||
|
Gson gson = new Gson();
|
||||||
|
return gson.toJson(card);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unserialized a Status
|
* Unserialized a Status
|
||||||
* @param serializedStatus String serialized status
|
* @param serializedStatus String serialized status
|
||||||
|
@ -1927,7 +1954,6 @@ public class Helper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serialized a List<String>
|
* Serialized a List<String>
|
||||||
* @param list List<String> to serialize
|
* @param list List<String> to serialize
|
||||||
|
|
|
@ -26,7 +26,7 @@ import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
|
||||||
public class Sqlite extends SQLiteOpenHelper {
|
public class Sqlite extends SQLiteOpenHelper {
|
||||||
|
|
||||||
public static final int DB_VERSION = 15;
|
public static final int DB_VERSION = 16;
|
||||||
public static final String DB_NAME = "mastodon_etalab_db";
|
public static final String DB_NAME = "mastodon_etalab_db";
|
||||||
public static SQLiteDatabase db;
|
public static SQLiteDatabase db;
|
||||||
private static Sqlite sInstance;
|
private static Sqlite sInstance;
|
||||||
|
@ -146,7 +146,7 @@ public class Sqlite extends SQLiteOpenHelper {
|
||||||
static final String COL_LANGUAGE = "LANGUAGE";
|
static final String COL_LANGUAGE = "LANGUAGE";
|
||||||
static final String COL_PINNED = "PINNED";
|
static final String COL_PINNED = "PINNED";
|
||||||
static final String COL_DATE_BACKUP = "DATE_BACKUP";
|
static final String COL_DATE_BACKUP = "DATE_BACKUP";
|
||||||
|
static final String COL_CARD = "CARD";
|
||||||
|
|
||||||
private final String CREATE_TABLE_STATUSES_CACHE = "CREATE TABLE " + TABLE_STATUSES_CACHE + " ("
|
private final String CREATE_TABLE_STATUSES_CACHE = "CREATE TABLE " + TABLE_STATUSES_CACHE + " ("
|
||||||
+ COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
|
+ COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||||
|
@ -156,7 +156,7 @@ public class Sqlite extends SQLiteOpenHelper {
|
||||||
+ COL_REBLOG + " TEXT, " + COL_CONTENT + " TEXT NOT NULL, " + COL_CREATED_AT + " TEXT NOT NULL, "
|
+ COL_REBLOG + " TEXT, " + COL_CONTENT + " TEXT NOT NULL, " + COL_CREATED_AT + " TEXT NOT NULL, "
|
||||||
+ COL_EMOJIS + " TEXT, " + COL_REBLOGS_COUNT + " INTEGER NOT NULL, " + COL_FAVOURITES_COUNT + " INTEGER NOT NULL, "
|
+ COL_EMOJIS + " TEXT, " + COL_REBLOGS_COUNT + " INTEGER NOT NULL, " + COL_FAVOURITES_COUNT + " INTEGER NOT NULL, "
|
||||||
+ COL_REBLOGGED + " INTEGER, " + COL_FAVOURITED + " INTEGER, " + COL_MUTED + " INTEGER, " + COL_SENSITIVE + " INTEGER, "
|
+ COL_REBLOGGED + " INTEGER, " + COL_FAVOURITED + " INTEGER, " + COL_MUTED + " INTEGER, " + COL_SENSITIVE + " INTEGER, "
|
||||||
+ COL_SPOILER_TEXT + " TEXT, " + COL_VISIBILITY + " TEXT NOT NULL, " + COL_MEDIA_ATTACHMENTS + " TEXT,"
|
+ COL_SPOILER_TEXT + " TEXT, " + COL_VISIBILITY + " TEXT NOT NULL, " + COL_MEDIA_ATTACHMENTS + " TEXT," + COL_CARD + " TEXT,"
|
||||||
+ COL_MENTIONS + " TEXT, " + COL_TAGS + " TEXT, " + COL_APPLICATION + " TEXT,"
|
+ COL_MENTIONS + " TEXT, " + COL_TAGS + " TEXT, " + COL_APPLICATION + " TEXT,"
|
||||||
+ COL_LANGUAGE + " TEXT," + COL_PINNED + " INTEGER)";
|
+ COL_LANGUAGE + " TEXT," + COL_PINNED + " INTEGER)";
|
||||||
|
|
||||||
|
@ -247,6 +247,9 @@ public class Sqlite extends SQLiteOpenHelper {
|
||||||
db.execSQL("ALTER TABLE " + TABLE_INSTANCES + " ADD COLUMN "+ COL_INSTANCE_TYPE + " TEXT");
|
db.execSQL("ALTER TABLE " + TABLE_INSTANCES + " ADD COLUMN "+ COL_INSTANCE_TYPE + " TEXT");
|
||||||
case 14:
|
case 14:
|
||||||
db.execSQL(CREATE_TABLE_PEERTUBE_FAVOURITES);
|
db.execSQL(CREATE_TABLE_PEERTUBE_FAVOURITES);
|
||||||
|
case 15:
|
||||||
|
if( oldVersion > 8)
|
||||||
|
db.execSQL("ALTER TABLE " + TABLE_STATUSES_CACHE + " ADD COLUMN "+ COL_CARD + " TEXT");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,7 @@ public class StatusCacheDAO {
|
||||||
values.put(Sqlite.COL_URI, status.getUri());
|
values.put(Sqlite.COL_URI, status.getUri());
|
||||||
values.put(Sqlite.COL_URL, status.getUrl());
|
values.put(Sqlite.COL_URL, status.getUrl());
|
||||||
values.put(Sqlite.COL_ACCOUNT, Helper.accountToStringStorage(status.getAccount()));
|
values.put(Sqlite.COL_ACCOUNT, Helper.accountToStringStorage(status.getAccount()));
|
||||||
|
values.put(Sqlite.COL_CARD, Helper.cardToStringStorage(status.getCard()));
|
||||||
values.put(Sqlite.COL_IN_REPLY_TO_ID, status.getIn_reply_to_id());
|
values.put(Sqlite.COL_IN_REPLY_TO_ID, status.getIn_reply_to_id());
|
||||||
values.put(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID, status.getIn_reply_to_account_id());
|
values.put(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID, status.getIn_reply_to_account_id());
|
||||||
values.put(Sqlite.COL_REBLOG, status.getReblog()!=null?Helper.statusToStringStorage(status.getReblog()):null);
|
values.put(Sqlite.COL_REBLOG, status.getReblog()!=null?Helper.statusToStringStorage(status.getReblog()):null);
|
||||||
|
@ -447,6 +448,7 @@ public class StatusCacheDAO {
|
||||||
status.setUri(c.getString(c.getColumnIndex(Sqlite.COL_URI)));
|
status.setUri(c.getString(c.getColumnIndex(Sqlite.COL_URI)));
|
||||||
status.setUrl(c.getString(c.getColumnIndex(Sqlite.COL_URL)));
|
status.setUrl(c.getString(c.getColumnIndex(Sqlite.COL_URL)));
|
||||||
status.setAccount(Helper.restoreAccountFromString(c.getString(c.getColumnIndex(Sqlite.COL_ACCOUNT))));
|
status.setAccount(Helper.restoreAccountFromString(c.getString(c.getColumnIndex(Sqlite.COL_ACCOUNT))));
|
||||||
|
status.setCard(Helper.restoreCardFromString(c.getString(c.getColumnIndex(Sqlite.COL_CARD))));
|
||||||
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
status.setIn_reply_to_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ID)));
|
||||||
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
status.setIn_reply_to_account_id(c.getString(c.getColumnIndex(Sqlite.COL_IN_REPLY_TO_ACCOUNT_ID)));
|
||||||
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
status.setReblog(Helper.restoreStatusFromString(c.getString(c.getColumnIndex(Sqlite.COL_REBLOG))));
|
||||||
|
|
Loading…
Reference in New Issue