fix: do not show DaR/S followsetting button for legacy

pull/2940/head
Audric Ackermann 1 year ago
parent 286260fae8
commit 5f53a44f6c

@ -193,7 +193,7 @@
"followSettingDisabled": "Messages you send will no longer disappear. Are you sure you want to turn off disappearing messages?",
"followSettingTimeAndType": "Set your messages to disappear $time$ after they have been $type$?",
"youChangedTheTimer": "<b>You</b> have set messages to disappear <b>$time$</b> after they have been <b>$mode$</b>",
"youChangedTheTimerLegacy": "<b>You<b> set the disappearing message timer to <b>$time$</b>",
"youChangedTheTimerLegacy": "<b>You</b> set the disappearing message timer to <b>$time$</b>",
"theyChangedTheTimer": "<b>$name$</b> has set messages to disappear <b>$time$</b> after they have been <b>$mode$</b>",
"theyChangedTheTimerLegacy": "<b>$name$</b> set the disappearing message timer to <b>$time$</b>",
"timerOption_0_seconds": "Off",

@ -20,7 +20,6 @@ import { Flex } from '../basic/Flex';
import { TextWithChildren } from '../basic/Text';
import { ExpirableReadableMessage } from './message/message-item/ExpirableReadableMessage';
// eslint-disable-next-line import/order
import { pick } from 'lodash';
import { ConversationInteraction } from '../../interactions';
import { getConversationController } from '../../session/conversations';
import { updateConfirmModal } from '../../state/ducks/modalDialog';
@ -105,12 +104,8 @@ function useAreSameThanOurSide(
const FollowSettingsButton = (props: PropsForExpirationTimer) => {
const v2Released = ReleasedFeatures.isUserConfigFeatureReleasedCached();
const isPrivateAndFriend = useSelectedIsPrivateFriend();
const click = useFollowSettingsButtonClick(
pick(props, ['disabled', 'expirationMode', 'timespanText', 'timespanSeconds'])
);
const areSameThanOurs = useAreSameThanOurSide(
pick(props, ['disabled', 'expirationMode', 'timespanSeconds'])
);
const click = useFollowSettingsButtonClick(props);
const areSameThanOurs = useAreSameThanOurSide(props);
if (!v2Released || !isPrivateAndFriend) {
return null;
@ -119,7 +114,8 @@ const FollowSettingsButton = (props: PropsForExpirationTimer) => {
props.type === 'fromMe' ||
props.type === 'fromSync' ||
props.pubkey === UserUtils.getOurPubKeyStrFromCache() ||
areSameThanOurs
areSameThanOurs ||
props.expirationMode === 'legacy' // we cannot follow settings with legacy mode
) {
return null;
}

Loading…
Cancel
Save