fixed some npes
This commit is contained in:
parent
2fa9af735b
commit
b477b8f57b
|
@ -1073,6 +1073,9 @@ public class ConversationActivity extends XmppActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attachLocationToConversation(Conversation conversation, Uri uri) {
|
private void attachLocationToConversation(Conversation conversation, Uri uri) {
|
||||||
|
if (conversation == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
xmppConnectionService.attachLocationToConversation(conversation,uri, new UiCallback<Message>() {
|
xmppConnectionService.attachLocationToConversation(conversation,uri, new UiCallback<Message>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1093,8 +1096,10 @@ public class ConversationActivity extends XmppActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attachFileToConversation(Conversation conversation, Uri uri) {
|
private void attachFileToConversation(Conversation conversation, Uri uri) {
|
||||||
prepareFileToast = Toast.makeText(getApplicationContext(),
|
if (conversation == null) {
|
||||||
getText(R.string.preparing_file), Toast.LENGTH_LONG);
|
return;
|
||||||
|
}
|
||||||
|
prepareFileToast = Toast.makeText(getApplicationContext(),getText(R.string.preparing_file), Toast.LENGTH_LONG);
|
||||||
prepareFileToast.show();
|
prepareFileToast.show();
|
||||||
xmppConnectionService.attachFileToConversation(conversation,uri, new UiCallback<Message>() {
|
xmppConnectionService.attachFileToConversation(conversation,uri, new UiCallback<Message>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1116,8 +1121,10 @@ public class ConversationActivity extends XmppActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attachImageToConversation(Conversation conversation, Uri uri) {
|
private void attachImageToConversation(Conversation conversation, Uri uri) {
|
||||||
prepareFileToast = Toast.makeText(getApplicationContext(),
|
if (conversation == null) {
|
||||||
getText(R.string.preparing_image), Toast.LENGTH_LONG);
|
return;
|
||||||
|
}
|
||||||
|
prepareFileToast = Toast.makeText(getApplicationContext(),getText(R.string.preparing_image), Toast.LENGTH_LONG);
|
||||||
prepareFileToast.show();
|
prepareFileToast.show();
|
||||||
xmppConnectionService.attachImageToConversation(conversation, uri,
|
xmppConnectionService.attachImageToConversation(conversation, uri,
|
||||||
new UiCallback<Message>() {
|
new UiCallback<Message>() {
|
||||||
|
|
Loading…
Reference in a new issue