@Override protected void saveCurrentAsDraft() { ComposeTweetDefault composeDraft = null; String currentStatus = mEditText.getText().toString(); if (currentStatus != null && currentStatus.equals("") == false) { if (mStatusValidator.getTweetLength(currentStatus) > 0) { if (getComposeTweetDefault() != null) { getComposeTweetDefault().updateStatus(currentStatus); if (getComposeTweetDefault().isPlaceholderStatus() == false) { composeDraft = getComposeTweetDefault(); } } else { composeDraft = new ComposeTweetDefault(getApp().getCurrentAccountScreenName(), currentStatus); } } } if (mListener != null) { mListener.saveDraft(composeDraft == null ? null : composeDraft.toString()); } }
private String getStatusHint(ComposeTweetDefault composeTweetDefault) { String hint = null; if (composeTweetDefault != null) { String lastStatus = composeTweetDefault.getStatus(); if (lastStatus != null) { lastStatus = Util.trimLeftRight(lastStatus); hint = getString(R.string.compose_direct_message_finish) + " \"" + getStatusHintSnippet(lastStatus, 16) + "\""; } } return hint; }