Skip to content
GitLab
Menu
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
android-components
Commits
4c2d5884
Commit
4c2d5884
authored
Oct 19, 2019
by
mawen7
Browse files
Set parentId to session before adding tab
parent
d40f5a40
Changes
2
Hide whitespace changes
Inline
Side-by-side
components/browser/session/src/main/java/mozilla/components/browser/session/LegacySessionManager.kt
View file @
4c2d5884
...
...
@@ -158,13 +158,6 @@ class LegacySessionManager(
if
(
parent
!=
null
)
{
val
parentIndex
=
values
.
indexOf
(
parent
)
if
(
parentIndex
==
-
1
)
{
throw
IllegalArgumentException
(
"The parent does not exist"
)
}
session
.
parentId
=
parent
.
id
values
.
add
(
parentIndex
+
1
,
session
)
}
else
{
if
(
viaRestore
)
{
...
...
components/browser/session/src/main/java/mozilla/components/browser/session/SessionManager.kt
View file @
4c2d5884
...
...
@@ -131,6 +131,11 @@ class SessionManager(
)
{
// Add store to Session so that it can dispatch actions whenever it changes.
session
.
store
=
store
if
(
parent
!=
null
)
{
require
(
all
.
contains
(
parent
))
{
"The parent does not exist"
}
session
.
parentId
=
parent
.
id
}
if
(
session
.
isCustomTabSession
())
{
store
?.
syncDispatch
(
CustomTabListAction
.
AddCustomTabAction
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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