Commit d6ea4775 authored by MozLando's avatar MozLando
Browse files

Merge #4798



4798: Set parentId to session before adding tab r=csadilek a=mawen7
Co-authored-by: default avatarmawen7 <mawen7@users.noreply.github.com>
parents 062ab784 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) {
......
......@@ -134,6 +134,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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment