[android-components](../../index.md) / [mozilla.components.browser.session.storage](../index.md) / [AutoSave](index.md) / [whenSessionsChange](./when-sessions-change.md)

# whenSessionsChange

`fun whenSessionsChange(): `[`AutoSave`](index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/browser/session/src/main/java/mozilla/components/browser/session/storage/AutoSave.kt#L76)

Saves the state automatically when the sessions change, e.g. sessions get added and removed.

