Fixed code duplication
This commit is contained in:
parent
528edd5f97
commit
42322ad324
2 changed files with 28 additions and 38 deletions
|
@ -77,8 +77,6 @@ public class ContactDetailsFragment extends Fragment implements OnClickListener
|
|||
LinphoneActivity.instance().goToChat(room.getPeerAddress().asStringUriOnly());
|
||||
} else {
|
||||
mWaitLayout.setVisibility(View.VISIBLE);
|
||||
room = lc.findOneToOneChatRoom(lc.getDefaultProxyConfig().getContact(), participant);
|
||||
if (room == null) {
|
||||
room = LinphoneManager.getLc().createClientGroupChatRoom(getString(R.string.dummy_group_chat_subject));
|
||||
room.setListener(new ChatRoomListenerStub() {
|
||||
@Override
|
||||
|
@ -94,9 +92,6 @@ public class ContactDetailsFragment extends Fragment implements OnClickListener
|
|||
}
|
||||
});
|
||||
room.addParticipant(participant);
|
||||
} else {
|
||||
LinphoneActivity.instance().goToChat(room.getPeerAddress().asStringUriOnly());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -176,8 +176,6 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
LinphoneActivity.instance().goToChat(room.getPeerAddress().asStringUriOnly());
|
||||
} else {
|
||||
mWaitLayout.setVisibility(View.VISIBLE);
|
||||
room = lc.findOneToOneChatRoom(lc.getDefaultProxyConfig().getContact(), participant);
|
||||
if (room == null) {
|
||||
room = lc.createClientGroupChatRoom(getString(R.string.dummy_group_chat_subject));
|
||||
room.setListener(new ChatRoomListenerStub() {
|
||||
@Override
|
||||
|
@ -193,9 +191,6 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
|
|||
}
|
||||
});
|
||||
room.addParticipant(participant);
|
||||
} else {
|
||||
LinphoneActivity.instance().goToChat(room.getPeerAddress().asStringUriOnly());
|
||||
}
|
||||
}
|
||||
} else if (id == R.id.add_contact) {
|
||||
Address addr = Factory.instance().createAddress(sipUri);
|
||||
|
|
Loading…
Reference in a new issue