Skip to content

Commit

Permalink
Fix/new btn response (#230)
Browse files Browse the repository at this point in the history
* Allow selecting multiple crops

* Added throttle for selecting options

* Upgrade location capture module

* added mode in context

* Button changes for new response format

* reduced settimeout to 4 seconds

* using "text" key in adivsory options

* Scroll after selecting option
  • Loading branch information
amit-s19 committed Feb 27, 2024
1 parent 526348a commit 252398a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions apps/amakrushi/src/components/chat-message-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,14 @@ const ChatMessageItem: FC<ChatMessageItemPropType> = ({ message, onSend }) => {
context?.sendMessage(choice);
setOptionDisabled(true);
if (isWeather)
setTimeout(() => {
setOptionDisabled(false);
}, 4000)
setTimeout(() => document.getElementsByClassName('PullToRefresh')?.[0]?.scrollTo({
top: 999999,
left: 0,
behavior: "smooth",
}), 500)
setTimeout(() => {
setOptionDisabled(false);
}, 4000)
}
}}>
<div
Expand All @@ -193,8 +198,9 @@ const ChatMessageItem: FC<ChatMessageItemPropType> = ({ message, onSend }) => {
</div>
</div>
</ListItem>
))}
</List>
))
}
</List >
);
},
[context, t]
Expand Down

0 comments on commit 252398a

Please sign in to comment.