From 8e287716da4083273bc39a418298086bf1b40b05 Mon Sep 17 00:00:00 2001 From: Tien Date: Mon, 16 May 2022 12:54:54 +0700 Subject: [PATCH] Disconnect when leave channel activity --- .../main/java/com/sendbird/uikit/fragments/BaseFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uikit/src/main/java/com/sendbird/uikit/fragments/BaseFragment.java b/uikit/src/main/java/com/sendbird/uikit/fragments/BaseFragment.java index 8978fe78..4b2edf03 100644 --- a/uikit/src/main/java/com/sendbird/uikit/fragments/BaseFragment.java +++ b/uikit/src/main/java/com/sendbird/uikit/fragments/BaseFragment.java @@ -50,6 +50,9 @@ protected void connect() { public void onDestroy() { super.onDestroy(); SendBird.removeConnectionHandler(CONNECTION_HANDLER_ID); + SendBirdUIKit.disconnect(() -> { + Logger.dev(">> BaseFragment::disconnect()"); + }); } @Override