Skip to content

Commit

Permalink
add chat bubbles
Browse files Browse the repository at this point in the history
  • Loading branch information
srikarparsi committed Sep 25, 2023
1 parent f997180 commit a3dffb3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
12 changes: 12 additions & 0 deletions assets/images/chatbubbles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Camera from '../../../assets/images/camera.svg';
import Car from '../../../assets/images/car.svg';
import Cash from '../../../assets/images/cash.svg';
import ChatBubble from '../../../assets/images/chatbubble.svg';
import ChatBubbles from '../../../assets/images/chatbubbles.svg';
import Checkmark from '../../../assets/images/checkmark.svg';
import Chair from '../../../assets/images/chair.svg';
import Close from '../../../assets/images/close.svg';
Expand Down Expand Up @@ -147,6 +148,7 @@ export {
Car,
Cash,
ChatBubble,
ChatBubbles,
Checkmark,
Chair,
Close,
Expand Down
16 changes: 8 additions & 8 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ function HeaderView(props) {
}

if (isChatThread) {
if (props.report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
if (props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
threeDotMenuItems.push({
icon: Expensicons.Exit,
icon: Expensicons.ChatBubbles,
iconFill: themeColors.icon,
text: props.translate('common.leaveThread'),
onSelected: () => Report.leaveRoom(props.report.reportID),
text: props.translate('common.joinThread'),
onSelected: () => Report.updateNotificationPreference(props.report.reportID, props.report.notificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false),
});
} else {
} else if (props.report.notificationPreference.length) {
threeDotMenuItems.push({
icon: Expensicons.ChatBubble,
icon: Expensicons.ChatBubbles,
iconFill: themeColors.icon,
text: props.translate('common.joinThread'),
onSelected: () => Report.updateNotificationPreference(props.report.reportID, props.report.notificationPreference, CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS, false),
text: props.translate('common.leaveThread'),
onSelected: () => Report.leaveRoom(props.report.reportID),
});
}
}
Expand Down

0 comments on commit a3dffb3

Please sign in to comment.