Skip to content

Commit b93faed

Browse files
committed
fix: multiple answers bug and remove logs
1 parent c33513e commit b93faed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package/src/components/Poll/CreatePollContent.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,12 @@ export const CreatePollContent = () => {
164164
{t<string>('Multiple answers')}
165165
</Text>
166166
<Switch
167-
onValueChange={() => setMultipleAnswersAllowed(!multipleAnswersAllowed)}
167+
onValueChange={() => {
168+
if (multipleAnswersAllowed) {
169+
setMaxVotesPerPersonEnabled(false);
170+
}
171+
setMultipleAnswersAllowed(!multipleAnswersAllowed);
172+
}}
168173
value={multipleAnswersAllowed}
169174
/>
170175
</View>

package/src/store/apis/updatePollMessage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const updatePollMessage = <
3535
for (const pollFromDB of pollsFromDB) {
3636
const serializedPoll = mapStorableToPoll(pollFromDB);
3737
const { latest_answers = [], own_votes = [] } = serializedPoll;
38-
console.log(eventType);
3938
let newOwnVotes = own_votes;
4039
if (poll_vote && poll_vote.user?.id === userID) {
4140
newOwnVotes =

0 commit comments

Comments
 (0)