Meaning of 'only then'

Is there any difference in meaning between

check that newSnap != m_snap and invoke onSnapEnter only then.

and

check that newSnap != m_snap and invoke onSnapEnter only in that case.

?

Which is the correct way of expressing that the checked condition must fulfil, and not merely predate the invocation?


check that newSnap != m_snap and invoke onSnapEnter only in that case. is not idiomatic.

check that newSnap != m_snap and invoke onSnapEnter only then. has the wrong word order.

It should be check that newSnap != m_snap and only then invoke onSnapEnter.