updateUserSeatedState method

void updateUserSeatedState(
  1. String userId,
  2. bool isOnSeat
)

Implementation

void updateUserSeatedState(String userId, bool isOnSeat) {
  var index = getUserIndex(userId, userInfoList);
  if (index == -1) {
    return;
  }
  userInfoList[index].isOnSeat.value = isOnSeat;

  if (userId == currentUser.userId.value) {
    currentUser.isOnSeat.value = isOnSeat;
    if (!isOnSeat) {
      audioSetting.isMicDeviceOpened = false;
    }
    updateItemTouchableState();
  }
}