You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
This commit is contained in:
@@ -36,6 +36,7 @@ const DropdownAlert = require('react-native-dropdownalert').default;
|
||||
const AlarmServiceDriver = require('./services/AlarmServiceDriver').default;
|
||||
const SafeAreaView = require('./components/SafeAreaView');
|
||||
const { connect, Provider } = require('react-redux');
|
||||
import fastDeepEqual = require('fast-deep-equal');
|
||||
import { Provider as PaperProvider, MD3DarkTheme, MD3LightTheme } from 'react-native-paper';
|
||||
import BackButtonService from './services/BackButtonService';
|
||||
import NavService from '@joplin/lib/services/NavService';
|
||||
@@ -89,6 +90,8 @@ import JoplinCloudLoginScreen from './components/screens/JoplinCloudLoginScreen'
|
||||
|
||||
import SyncTargetNone from '@joplin/lib/SyncTargetNone';
|
||||
|
||||
|
||||
|
||||
SyncTargetRegistry.addClass(SyncTargetNone);
|
||||
SyncTargetRegistry.addClass(SyncTargetOneDrive);
|
||||
SyncTargetRegistry.addClass(SyncTargetNextcloud);
|
||||
@@ -301,7 +304,18 @@ const appReducer = (state = appDefaultState, action: any) => {
|
||||
const currentRoute = state.route;
|
||||
|
||||
if (!historyGoingBack && historyCanGoBackTo(currentRoute)) {
|
||||
navHistory.push(currentRoute);
|
||||
const previousRoute = navHistory.length && navHistory[navHistory.length - 1];
|
||||
const isDifferentRoute = !previousRoute || !fastDeepEqual(navHistory[navHistory.length - 1], currentRoute);
|
||||
|
||||
// Avoid multiple consecutive duplicate screens in the navigation history -- these can make
|
||||
// pressing "back" seem to have no effect.
|
||||
if (isDifferentRoute) {
|
||||
navHistory.push(currentRoute);
|
||||
}
|
||||
}
|
||||
|
||||
if (action.clearHistory) {
|
||||
navHistory.splice(0, navHistory.length);
|
||||
}
|
||||
|
||||
newState = { ...state };
|
||||
|
||||
Reference in New Issue
Block a user