Chooses online chat transport when adding or updating chat transports.

cusax-fix 4994
Damian Minkov 12 years ago
parent c20ec62245
commit 444cde419f

@ -699,10 +699,24 @@ private void addChatTransports( Contact contact,
sessionRenderer.setSelectedChatTransport(chatTransport, false);
}
// If no current transport is set we choose the first one in the list.
// If no current transport is set we choose
// the first online from the list.
if (currentChatTransport == null)
{
currentChatTransport = chatTransports.get(0);
for(ChatTransport ct : chatTransports)
{
if(ct.getStatus() != null
&& ct.getStatus().isOnline())
{
currentChatTransport = ct;
break;
}
}
// if still nothing selected, choose the first one
if (currentChatTransport == null)
currentChatTransport = chatTransports.get(0);
sessionRenderer
.setSelectedChatTransport(currentChatTransport, false);
}

Loading…
Cancel
Save