Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
fix confirmation setting
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Nov 16, 2021
1 parent 5495284 commit 97aa1eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/settings/menu/settingsTweetActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const SettingsTweetActions: FC<SettingsMenuSectionProps> = (props) => {
label: getTransString('settings_action_download_media'),
},
{
initialValue: settings.requireConfirmationForTweetAction,
initialValue: settings.tweetActions.requireConfirmationForTweetAction,
key: 'requireConfirmationForTweetAction',
label: getTransString('settings_require_confirmation_for_block_and_mute_actions'),
},
Expand Down
4 changes: 2 additions & 2 deletions src/features/addTweetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export const maybeAddTweetActions = makeBTDModule(({settings, TD, jq, mR}) => {
return;

case TweetActions.MUTE_ACCOUNT: {
const blocked = settings.requireConfirmationForTweetAction
const blocked = settings.tweetActions.requireConfirmationForTweetAction
? !confirm(`Are you sure you want to mute @${user.screenName}?`)
: false;
if (blocked) {
Expand All @@ -367,7 +367,7 @@ export const maybeAddTweetActions = makeBTDModule(({settings, TD, jq, mR}) => {
}

case TweetActions.BLOCK_ACCOUNT: {
const blocked = settings.requireConfirmationForTweetAction
const blocked = settings.tweetActions.requireConfirmationForTweetAction
? !confirm(`Are you sure you want to block @${user.screenName}?`)
: false;
if (blocked) {
Expand Down
3 changes: 2 additions & 1 deletion src/types/btdSettingsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,11 @@ export const RBetterTweetDeckSettings = t.type({

/** Shows a block icon to block the author of a tweet quickly. */
addBlockAction: withDefault(t.boolean, false),

requireConfirmationForTweetAction: withDefault(t.boolean, true),
}),
{}
),
requireConfirmationForTweetAction: withDefault(t.boolean, true),

/** Always shows the account picker when favoriting a tweet */
showAccountChoiceOnFavorite: withDefault(t.boolean, false),
Expand Down

0 comments on commit 97aa1eb

Please sign in to comment.