| 4500 | async function onImageSwiped({ message, element, direction }) { | 4500 | async function onImageSwiped({ message, element, direction }) { |
| 4501 | const { powerUserSettings, accountStorage } = getContext(); | 4501 | const { powerUserSettings, accountStorage } = getContext(); |
| 4502 | | 4502 | |
| | 4503 | if (!isValidState()) { |
| | 4504 | return; |
| | 4505 | } |
| | 4506 | |
| 4503 | if (!message || direction !== SWIPE_DIRECTION.RIGHT || powerUserSettings.image_overswipe !== IMAGE_OVERSWIPE.GENERATE) { | 4507 | if (!message || direction !== SWIPE_DIRECTION.RIGHT || powerUserSettings.image_overswipe !== IMAGE_OVERSWIPE.GENERATE) { |
| 4504 | return; | 4508 | return; |
| 4505 | } | 4509 | } |