mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
Fixes #741 - Dont show the current session in the previous session list
This commit is contained in:
parent
abd225463a
commit
77189a00a0
@ -95,11 +95,13 @@ class HomeFragment : Fragment() {
|
||||
val bundles = requireComponents.core.sessionStorage.bundles(temporaryNumberOfSessions)
|
||||
|
||||
bundles.observe(this, Observer { sessionBundles ->
|
||||
val archivedSessions = sessionBundles.mapNotNull { sessionBundle ->
|
||||
sessionBundle.id?.let {
|
||||
ArchivedSession(it, sessionBundle, sessionBundle.lastSavedAt, sessionBundle.urls)
|
||||
val archivedSessions = sessionBundles
|
||||
.filter { it.id != requireComponents.core.sessionStorage.current()?.id }
|
||||
.mapNotNull { sessionBundle ->
|
||||
sessionBundle.id?.let {
|
||||
ArchivedSession(it, sessionBundle, sessionBundle.lastSavedAt, sessionBundle.urls)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getManagedEmitter<SessionsChange>().onNext(SessionsChange.Changed(archivedSessions))
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user