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

Set parentId to session before adding tab

parent d40f5a40
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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) {
+5 −0
Original line number Diff line number Diff line
@@ -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(