Skip to content

Commit

Permalink
Only disconnect the connection when leaving the Channel fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
tien-awair committed May 17, 2022
1 parent b60b57e commit af8f4ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ protected void connect() {
public void onDestroy() {
super.onDestroy();
SendBird.removeConnectionHandler(CONNECTION_HANDLER_ID);
SendBirdUIKit.disconnect(() -> {
Logger.dev(">> BaseFragment::disconnect()");
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ public void onDestroy() {
if (!isInitCallFinished.get()) {
loadingDialogHandler.shouldDismissLoadingDialog();
}
SendBirdUIKit.disconnect(() -> {
Logger.dev(">> BaseFragment::disconnect()");
});
}

@Nullable
Expand Down

0 comments on commit af8f4ce

Please sign in to comment.