Fix tabs nav (#6898)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-10-12 21:33:54 +04:00 committed by GitHub
parent b5c82bcb82
commit e63d50130b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -175,7 +175,7 @@
const query = createQuery()
$: query.query(
workbench.class.WorkbenchTab,
{},
{ attachedTo: account._id },
(res) => {
tabs = res
tabsStore.set(tabs)
@ -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}

View File

@ -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) {