convertReceiveMsgOptEnum method Null safety

int convertReceiveMsgOptEnum(
  1. ReceiveMsgOptEnum opt
)

Implementation

static int convertReceiveMsgOptEnum(ReceiveMsgOptEnum opt) {
  if (opt == ReceiveMsgOptEnum.V2TIM_NOT_RECEIVE_MESSAGE) {
    return 1;
  }
  if (opt == ReceiveMsgOptEnum.V2TIM_RECEIVE_MESSAGE) {
    return 0;
  }
  if (opt == ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE) {
    return 2;
  }

  return 0;
}