[MM-37423] Custom Status: Don't show 'Custom Date and Time' for recent statuses (#5641)

* Custom Status: Don't show 'Custom Date and Time' for recent statuses

* move status boolean out of jsx
This commit is contained in:
Ashish Dhama 2021-08-25 00:11:49 +05:30 committed by GitHub
parent 846aa759b2
commit e6dbd5fbdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,10 @@ const CustomStatusSuggestion = ({handleSuggestionClick, emoji, text, theme, sepa
}
}, []);
const showCustomStatus = Boolean(duration &&
duration !== CustomStatusDuration.DATE_AND_TIME &&
isExpirySupported);
const clearButton = handleClear && expires_at ?
(
<View style={style.clearButtonContainer}>
@ -74,7 +78,7 @@ const CustomStatusSuggestion = ({handleSuggestionClick, emoji, text, theme, sepa
textStyle={style.customStatusText}
/>
</View>
{Boolean(duration && isExpirySupported) && (
{showCustomStatus && (
<View style={{paddingTop: 5}}>
<CustomStatusText
text={intl.formatMessage(durationValues[duration])}