From e3c8998f663968695efa7d43705dc079d93e5ddd Mon Sep 17 00:00:00 2001 From: torrentcome Date: Thu, 29 Jun 2017 17:58:01 +0200 Subject: [PATCH] (rm) tootaction ...for keep easier action , we will distribute every result inside the activity --- .../keylesspalace/tusky/db/TootAction.java | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 app/src/main/java/com/keylesspalace/tusky/db/TootAction.java diff --git a/app/src/main/java/com/keylesspalace/tusky/db/TootAction.java b/app/src/main/java/com/keylesspalace/tusky/db/TootAction.java deleted file mode 100644 index 7232dfa4..00000000 --- a/app/src/main/java/com/keylesspalace/tusky/db/TootAction.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.keylesspalace.tusky.db; - -import android.os.AsyncTask; -import android.text.TextUtils; -import android.util.Log; - -import com.keylesspalace.tusky.TuskyApplication; - -import java.util.List; - -/** - * Created by cto3543 on 29/06/2017. - * - */ - -public class TootAction { - - private static TootDao tootDao = TuskyApplication.getDB().tootDao(); - - public static void getAllToot() { - new AsyncTask>() { - @Override - protected List doInBackground(Void... params) { - return tootDao.loadAll(); - } - - @Override - protected void onPostExecute(List tootEntities) { - super.onPostExecute(tootEntities); - for (TootEntity t : tootEntities) { - Log.e("toot", "id=" + t.getUid() + "text=" + t.getText()); - } - } - }.execute(); - } - - public static void saveTheToot(String s) { - if (!TextUtils.isEmpty(s)) { - final TootEntity toot = new TootEntity(); - toot.setText(s); - new AsyncTask() { - @Override - protected Void doInBackground(Void... params) { - tootDao.insert(toot); - return null; - } - }.execute(); - } - } - -}