Commit 4c2d5884 authored by mawen7's avatar mawen7
Browse files

Set parentId to session before adding tab

parent d40f5a40
......@@ -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) {
......
......@@ -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(
......
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