updateUserMessageState method
Implementation
void updateUserMessageState(
String userId, bool isDisable, RxList<UserModel> destList) {
var index = getUserIndex(userId, destList);
if (index == -1) {
return;
}
destList[index].ableSendingMessage.value = !isDisable;
if (userId == currentUser.userId.value) {
currentUser.ableSendingMessage.value = !isDisable;
if (isDisable) {
makeToast(
msg: RoomContentsTranslations.translate(
'messageTurnedOffByHostToast'));
} else {
makeToast(
msg: RoomContentsTranslations.translate(
'messageTurnedOnByHostToast'));
}
}
}