Loading QKSMS/src/main/java/com/moez/QKSMS/data/ConversationLegacy.java +17 −29 Original line number Diff line number Diff line Loading @@ -162,10 +162,6 @@ public class ConversationLegacy { public void saveDraft(final String draft) { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { clearDrafts(); if (draft.length() > 0) { Loading @@ -188,16 +184,8 @@ public class ConversationLegacy { ConversationLegacy.this.draft = null; } return null; } @Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); Toast.makeText(context, R.string.toast_draft, Toast.LENGTH_SHORT).show(); } }.execute((Void[]) null); } public int getType() { if (type == 0) { Loading QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java +6 −8 Original line number Diff line number Diff line Loading @@ -268,6 +268,12 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa onOpenConversation(); } @Override public void onDestroy() { super.onDestroy(); mComposeView.saveDraft(); } @Override public void onSaveInstanceState(Bundle outState) { outState.putLong(ARG_THREAD_ID, mThreadId); Loading Loading @@ -511,14 +517,6 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa v.vibrate(vibrateTime); } @Override public void onPause() { super.onPause(); // Save the draft. This should also clear the EditText. mComposeView.saveDraft(); } /** * Photo Selection result */ Loading QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java +1 −2 Original line number Diff line number Diff line Loading @@ -742,8 +742,7 @@ public class ComposeView extends LinearLayout implements View.OnClickListener { mConversationLegacy.clearDrafts(); } else if (!TextUtils.isEmpty(draft) && (!mConversationLegacy.hasDraft() || !draft.equals(mConversationLegacy.getDraft()))) { (!mConversationLegacy.hasDraft() || !draft.equals(mConversationLegacy.getDraft()))) { mConversationLegacy.saveDraft(draft); } } Loading Loading
QKSMS/src/main/java/com/moez/QKSMS/data/ConversationLegacy.java +17 −29 Original line number Diff line number Diff line Loading @@ -162,10 +162,6 @@ public class ConversationLegacy { public void saveDraft(final String draft) { new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { clearDrafts(); if (draft.length() > 0) { Loading @@ -188,16 +184,8 @@ public class ConversationLegacy { ConversationLegacy.this.draft = null; } return null; } @Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); Toast.makeText(context, R.string.toast_draft, Toast.LENGTH_SHORT).show(); } }.execute((Void[]) null); } public int getType() { if (type == 0) { Loading
QKSMS/src/main/java/com/moez/QKSMS/ui/messagelist/MessageListFragment.java +6 −8 Original line number Diff line number Diff line Loading @@ -268,6 +268,12 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa onOpenConversation(); } @Override public void onDestroy() { super.onDestroy(); mComposeView.saveDraft(); } @Override public void onSaveInstanceState(Bundle outState) { outState.putLong(ARG_THREAD_ID, mThreadId); Loading Loading @@ -511,14 +517,6 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa v.vibrate(vibrateTime); } @Override public void onPause() { super.onPause(); // Save the draft. This should also clear the EditText. mComposeView.saveDraft(); } /** * Photo Selection result */ Loading
QKSMS/src/main/java/com/moez/QKSMS/ui/view/ComposeView.java +1 −2 Original line number Diff line number Diff line Loading @@ -742,8 +742,7 @@ public class ComposeView extends LinearLayout implements View.OnClickListener { mConversationLegacy.clearDrafts(); } else if (!TextUtils.isEmpty(draft) && (!mConversationLegacy.hasDraft() || !draft.equals(mConversationLegacy.getDraft()))) { (!mConversationLegacy.hasDraft() || !draft.equals(mConversationLegacy.getDraft()))) { mConversationLegacy.saveDraft(draft); } } Loading