mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
Improve sending nick
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
6ce0d53412
commit
c48e9e01a2
2 changed files with 22 additions and 7 deletions
|
@ -1722,19 +1722,35 @@ public class CallController extends BaseController {
|
|||
nickChangedPayload.put("userid", conversationUser.getUserId());
|
||||
nickChangedPayload.put("name", conversationUser.getDisplayName());
|
||||
dataChannelMessage.setPayload(nickChangedPayload);
|
||||
final MagicPeerConnectionWrapper magicPeerConnectionWrapper;
|
||||
for (int i = 0; i < magicPeerConnectionWrapperList.size(); i++) {
|
||||
if (magicPeerConnectionWrapperList.get(i).isMCUPublisher()) {
|
||||
int finalI = i;
|
||||
magicPeerConnectionWrapper = magicPeerConnectionWrapperList.get(i);
|
||||
Observable
|
||||
.interval(1, TimeUnit.SECONDS)
|
||||
.repeat()
|
||||
.repeatWhen() -> !isConnectionEstablished() || isBeingDestroyed() || isDestroyed() || !MerlinTheWizard.isConnectedToInternet())
|
||||
.observeOn(Schedulers.io())
|
||||
.doOnNext(new Consumer<Long>() {
|
||||
.subscribe(new Observer<Long>() {
|
||||
@Override
|
||||
public void accept(Long aLong) {
|
||||
magicPeerConnectionWrapperList.get(finalI).sendNickChannelData(dataChannelMessage);
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
}).subscribe();
|
||||
|
||||
@Override
|
||||
public void onNext(Long aLong) {
|
||||
magicPeerConnectionWrapper.sendNickChannelData(dataChannelMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ public class MagicWebSocketInstance extends WebSocketListener {
|
|||
|
||||
@Override
|
||||
public void onMessage(WebSocket webSocket, String text) {
|
||||
Log.d(TAG, "ReceivingBEFORE : " + webSocket.toString() + " " + text);
|
||||
if (webSocket == internalWebSocket) {
|
||||
Log.d(TAG, "Receiving : " + webSocket.toString() + " " + text);
|
||||
LoggingUtils.writeLogEntryToFile(context,
|
||||
|
|
Loading…
Reference in a new issue