How to add history state?

Hi. I’m developing kind of SNS android app.

Normal state flow is:
[list -> post -> comment]

When push notification is touched:
[comment]

I want to add two history states that list and post when app is excuted by push notification,
like normal state flow.
(list -> post) -> comment

I need help!