Maybe you are using the blocking functions of AccelStepper, but we can't know for sure because your code seems to be a secret.
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
A schematic or wiring diagram may be useful, as well.