fix: hide actions when favorited

This commit is contained in:
cha0s 2020-07-25 10:03:30 -05:00
parent 901693ef16
commit 414793f5eb

View File

@ -53,12 +53,12 @@ export default function ChatRightUsers() {
if (!isAnonymous && !isSelf) { if (!isAnonymous && !isSelf) {
if (hasFriendship) { if (hasFriendship) {
if ('active' === friendship[index].status) { if ('active' === friendship[index].status) {
if (-1 === favoriteUsers.indexOf(username)) {
userActions.push({ userActions.push({
icon: '🚫', icon: '🚫',
label: 'Unfriend', label: 'Unfriend',
onClick: () => dispatch(submitRemoveFriend(id)), onClick: () => dispatch(submitRemoveFriend(id)),
}); });
if (-1 === favoriteUsers.indexOf(username)) {
userActions.push({ userActions.push({
icon: '❤️', icon: '❤️',
label: 'Favorite', label: 'Favorite',
@ -105,7 +105,7 @@ export default function ChatRightUsers() {
onClick: () => dispatch(submitUnblock(id)), onClick: () => dispatch(submitUnblock(id)),
}); });
} }
else { else if (-1 === favoriteUsers.indexOf(username)) {
userActions.push({ userActions.push({
icon: '☢️', icon: '☢️',
label: 'Block', label: 'Block',