android-components / mozilla.components.browser.session.helper

Package mozilla.components.browser.session.helper

Functions

Name Summary
onlyIfChanged fun <T> onlyIfChanged(onMainThread: Boolean = false, map: (BrowserState) -> T?, then: (BrowserState, T) -> Unit): Observer
Creates an Observer that will map the received BrowserState to T (using map) and will invoke the callback then only if the value has changed from the last mapped value.