diff --git a/native/chat/settings/thread-settings-notifications.react.js b/native/chat/settings/thread-settings-notifications.react.js
--- a/native/chat/settings/thread-settings-notifications.react.js
+++ b/native/chat/settings/thread-settings-notifications.react.js
@@ -153,19 +153,21 @@
onSave,
isSidebar,
canPromoteSidebar,
+ parentThreadIsInBackground,
} = useThreadSettingsNotifications(threadInfo, goBack);
React.useEffect(() => {
setOptions({
- headerRight: () => (
-
- ),
+ headerRight: () =>
+ parentThreadIsInBackground ? null : (
+
+ ),
});
- }, [saveButtonDisabled, onSave, setOptions]);
+ }, [saveButtonDisabled, onSave, setOptions, parentThreadIsInBackground]);
const styles = useStyles(unboundStyles);
@@ -256,39 +258,77 @@
styles.noticeTextContainer,
]);
- return (
-
-
-
-
-
-
-
-
-
+ const threadSettingsNotifications = React.useMemo(() => {
+ if (parentThreadIsInBackground) {
+ return (
+
+
+ {threadSettingsNotificationsCopy.PARENT_THREAD_IS_BACKGROUND}
+
+
+ {canPromoteSidebar
+ ? threadSettingsNotificationsCopy.PARENT_THREAD_IS_BACKGROUND_CAN_PROMOTE
+ : threadSettingsNotificationsCopy.PARENT_THREAD_IS_BACKGROUND_CAN_NOT_PROMOTE}
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {noticeText}
- {noticeText}
-
- );
+ );
+ }, [
+ allNotificationsDescription,
+ allNotificationsIllustration,
+ badgeOnlyDescription,
+ badgeOnlyIllustration,
+ canPromoteSidebar,
+ isSidebar,
+ mutedDescription,
+ mutedIllustration,
+ noticeText,
+ notificationSettings,
+ onBackgroundSelected,
+ onBadgeOnlySelected,
+ onFocusedSelected,
+ parentThreadIsInBackground,
+ styles.container,
+ styles.enumSettingsOptionContainer,
+ styles.parentThreadIsInBackgroundNoticeContainerStyle,
+ styles.parentThreadIsInBackgroundNoticeText,
+ ]);
+
+ return threadSettingsNotifications;
}
const unboundStyles = {
@@ -331,6 +371,18 @@
lineHeight: 18,
marginVertical: 8,
},
+ parentThreadIsInBackgroundNoticeContainerStyle: {
+ backgroundColor: 'panelForeground',
+ paddingHorizontal: 16,
+ paddingVertical: 8,
+ },
+ parentThreadIsInBackgroundNoticeText: {
+ color: 'panelForegroundSecondaryLabel',
+ fontSize: 16,
+ lineHeight: 20,
+ textAlign: 'left',
+ marginVertical: 8,
+ },
};
export default ThreadSettingsNotifications;