Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
fenix
Commits
516a6fe9
Commit
516a6fe9
authored
May 21, 2020
by
ekager
Committed by
Emily Kager
May 21, 2020
Browse files
For #6832 - Only emit session changes if fragment is attached
parent
83ab7646
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
View file @
516a6fe9
...
...
@@ -72,6 +72,7 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
import
org.mozilla.fenix.BrowserDirection
import
org.mozilla.fenix.HomeActivity
import
org.mozilla.fenix.R
import
org.mozilla.fenix.addons.runIfFragmentIsAttached
import
org.mozilla.fenix.browser.BrowserAnimator.Companion.getToolbarNavOptions
import
org.mozilla.fenix.browser.browsingmode.BrowsingMode
import
org.mozilla.fenix.components.FenixSnackbar
...
...
@@ -829,7 +830,9 @@ class HomeFragment : Fragment() {
}
private
fun
emitSessionChanges
()
{
homeFragmentStore
.
dispatch
(
HomeFragmentAction
.
TabsChange
(
getListOfTabs
()))
runIfFragmentIsAttached
{
homeFragmentStore
.
dispatch
(
HomeFragmentAction
.
TabsChange
(
getListOfTabs
()))
}
}
private
fun
getListOfSessions
():
List
<
Session
>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment