mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-27 19:22:15 -05:00
some code clean up to fix some rare NPE’s
This commit is contained in:
parent
570a22206d
commit
9e20a4936e
@ -929,10 +929,10 @@ public class ConversationActivity extends XmppActivity
|
||||
}
|
||||
|
||||
private void handleViewConversationIntent(final Intent intent) {
|
||||
final String uuid = (String) intent.getExtras().get(CONVERSATION);
|
||||
final String downloadUuid = (String) intent.getExtras().get(MESSAGE);
|
||||
final String text = intent.getExtras().getString(TEXT, "");
|
||||
final String nick = intent.getExtras().getString(NICK, null);
|
||||
final String uuid = intent.getStringExtra(CONVERSATION);
|
||||
final String downloadUuid = intent.getStringExtra(MESSAGE);
|
||||
final String text = intent.getStringExtra(TEXT);
|
||||
final String nick = intent.getStringExtra(NICK);
|
||||
if (selectConversationByUuid(uuid)) {
|
||||
this.mConversationFragment.reInit(getSelectedConversation());
|
||||
if (nick != null) {
|
||||
|
@ -1019,6 +1019,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
}
|
||||
|
||||
public void appendText(String text) {
|
||||
if (text == null) {
|
||||
return;
|
||||
}
|
||||
String previous = this.mEditMessage.getText().toString();
|
||||
if (previous.length() != 0 && !previous.endsWith(" ")) {
|
||||
text = " " + text;
|
||||
|
Loading…
Reference in New Issue
Block a user