mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-19 05:39:20 -04:00
Go back to using modal
This commit is contained in:
@@ -16,7 +16,6 @@ export default class AuthModal extends Component {
|
||||
|
||||
this.stateObserver = ApplicationState.get().addStateObserver((state) => {
|
||||
let authProps = ApplicationState.get().getAuthenticationPropsForAppState(state);
|
||||
console.log("GOt auth props", authProps);
|
||||
this.setState({authProps: authProps});
|
||||
});
|
||||
}
|
||||
@@ -29,8 +28,12 @@ export default class AuthModal extends Component {
|
||||
let authProps = this.state.authProps;
|
||||
let visible = (authProps.passcode || authProps.fingerprint) || false;
|
||||
return (
|
||||
<View style={GlobalStyles.styles().flexContainer}>
|
||||
{visible &&
|
||||
<Modal
|
||||
animationType={"slide"}
|
||||
transparent={false}
|
||||
visible={visible}
|
||||
onRequestClose={() => {}}>
|
||||
|
||||
<Authenticate
|
||||
ref={'authenticate'}
|
||||
title={authProps.title}
|
||||
@@ -41,9 +44,8 @@ export default class AuthModal extends Component {
|
||||
pseudoModal={true}
|
||||
authProps={authProps}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class Notes extends Abstract {
|
||||
this.props.navigator.popToRoot();
|
||||
|
||||
// Don't use the below as it will also for some reason dismiss the non RNN auth modal as well
|
||||
this.props.navigator.dismissAllModals({animationType: 'none'});
|
||||
// this.props.navigator.dismissAllModals({animationType: 'none'});
|
||||
|
||||
this.props.navigator.switchToTab({
|
||||
tabIndex: 0
|
||||
@@ -48,12 +48,6 @@ export default class Notes extends Abstract {
|
||||
})
|
||||
}
|
||||
|
||||
// Implemented by super class. We just want to latch on so we can configure the nav bar.
|
||||
unlockContent() {
|
||||
super.unlockContent();
|
||||
this.configureNavBar(true);
|
||||
}
|
||||
|
||||
loadInitialState() {
|
||||
this.options = App.get().globalOptions();
|
||||
|
||||
@@ -143,21 +137,7 @@ export default class Notes extends Abstract {
|
||||
}
|
||||
|
||||
configureNavBar(initial = false) {
|
||||
if(this.state.lockContent) {
|
||||
this.notesTitle = "Authentication Required";
|
||||
this.props.navigator.setTitle({title: this.notesTitle, animated: false});
|
||||
this.props.navigator.setButtons({
|
||||
rightButtons: [],
|
||||
leftButtons: [],
|
||||
fab: {},
|
||||
animated: false
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if(!this.dataLoaded) {
|
||||
this.notesTitle = "Notes";
|
||||
this.props.navigator.setTitle({title: this.notesTitle, animated: false});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user