Skip to content

Commit

Permalink
Fix tabs nav (#6898)
Browse files Browse the repository at this point in the history
Signed-off-by: Kristina Fefelova <[email protected]>
  • Loading branch information
kristina-fefelova authored and haiodo committed Oct 12, 2024
1 parent 15aab67 commit 765043d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
if (last != null) {
try {
const newLocation: Location = JSON.parse(last)
if (newLocation.path[2] === app && newLocation.path[3] != null) {
if (newLocation.path[1] === loc.path[1] && newLocation.path[2] === app && newLocation.path[3] != null) {
return newLocation
}
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/workbench-resources/src/components/Workbench.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
const query = createQuery()
$: query.query(
workbench.class.WorkbenchTab,
{},
{ attachedTo: account._id },
(res) => {
tabs = res
tabsStore.set(tabs)
Expand Down Expand Up @@ -788,7 +788,7 @@
/>
</div>
<!-- <ActivityStatus status="active" /> -->
<NavLink app={notificationId} shrink={0} restoreLastLocation>
<NavLink app={notificationId} shrink={0}>
<AppItem
icon={notification.icon.Notifications}
label={notification.string.Inbox}
Expand Down
2 changes: 1 addition & 1 deletion plugins/workbench-resources/src/workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export async function createTab (): Promise<void> {
try {
const last = localStorage.getItem(`${locationStorageKeyId}_${notificationId}`)
const lastLocation: Location | undefined = last != null ? JSON.parse(last) : undefined
if (lastLocation != null && lastLocation.path[2] === notificationId) {
if (lastLocation != null && lastLocation.path[1] === loc.path[1] && lastLocation.path[2] === notificationId) {
defaultUrl = locationToUrl(lastLocation)
}
} catch (e) {
Expand Down

0 comments on commit 765043d

Please sign in to comment.