In the first, "then" is the signal to use simple past.
In the second, "after" is the signal to use past perfect because of the subject and verb, meaning buying tickets was reliant on finishing ice cream, but the next two verbs are simple past.
We walked around the garden for an hour, then we stopped for ice cream. After we had finished eating the ice cream, we bought our tickets and stood in a long queue.
Andres M.
05/07/18