Skip to content

Commit 7ac8534

Browse files
committed
fix: native image picker poll control
1 parent fe08bd7 commit 7ac8534

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

package/src/components/MessageInput/components/NativeAttachmentPicker.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ export const NativeAttachmentPicker = ({
120120

121121
// do not allow poll creation in threads
122122
const buttons =
123-
threadList && hasCreatePoll && ownCapabilities.sendPoll
124-
? []
125-
: [
123+
!threadList && hasCreatePoll && ownCapabilities.sendPoll
124+
? [
126125
{
127126
icon: <CreatePollIcon />,
128127
id: 'Poll',
129128
onPressHandler: () => {
130129
openPollCreationDialog?.({ sendMessage });
131130
},
132131
},
133-
];
132+
]
133+
: [];
134134

135135
if (hasImagePicker) {
136136
buttons.push({

0 commit comments

Comments
 (0)