Use global navigation history stack
The readers history stack was different to the one from the rest of the app, resulting in an infinite loop when using the closing the reader and using the back button in the manga page, since the back button just opened the reader again.
Regression introduced with 4bb458778e
This commit is contained in:
@@ -10,6 +10,8 @@ import React, { useContext, useEffect } from 'react';
|
||||
import { INavbarOverride } from '@/typings';
|
||||
|
||||
type ContextType = {
|
||||
history: string[];
|
||||
|
||||
// Default back button url
|
||||
defaultBackTo: string | undefined;
|
||||
setDefaultBackTo: React.Dispatch<React.SetStateAction<string | undefined>>;
|
||||
@@ -28,6 +30,7 @@ type ContextType = {
|
||||
};
|
||||
|
||||
export const NavBarContext = React.createContext<ContextType>({
|
||||
history: [],
|
||||
defaultBackTo: undefined,
|
||||
setDefaultBackTo: (): void => {},
|
||||
title: 'Suwayomi',
|
||||
|
||||
Reference in New Issue
Block a user