restore that shit
This commit is contained in:
parent
ff85477d93
commit
f1dceebcb4
6 changed files with 19 additions and 3 deletions
|
@ -1,9 +1,18 @@
|
|||
import { connect } from 'react-redux';
|
||||
<<<<<<< HEAD
|
||||
import { selectScrollStartingPosition } from 'redux/selectors/app';
|
||||
import Router from './view';
|
||||
|
||||
const select = state => ({
|
||||
currentScroll: selectScrollStartingPosition(state),
|
||||
=======
|
||||
import Router from './view';
|
||||
|
||||
const select = state => ({
|
||||
scroll: state.app.scrollHistory[state.app.scrollHistory.length - 1],
|
||||
scrollHistory: state.app.scrollHistory,
|
||||
currentScroll: state.app.currentScroll || 0,
|
||||
>>>>>>> restore that shit
|
||||
});
|
||||
|
||||
export default connect(select)(Router);
|
||||
|
|
|
@ -22,7 +22,11 @@ import NavigationHistory from 'page/navigationHistory';
|
|||
import TagsPage from 'page/tags';
|
||||
import FollowingPage from 'page/following';
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Tell the browser we are handling scroll restoration
|
||||
=======
|
||||
// Let app handle scroll
|
||||
>>>>>>> restore that shit
|
||||
if ('scrollRestoration' in history) {
|
||||
history.scrollRestoration = 'manual';
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.onReadyToLaunch();
|
||||
|
||||
const { checkDaemonVersion } = this.props;
|
||||
this.adjustErrorTimeout();
|
||||
Lbry.connect()
|
||||
|
|
|
@ -63,7 +63,7 @@ class UriIndicator extends React.PureComponent<Props> {
|
|||
|
||||
return (
|
||||
<Button className="button--uri-indicator" navigate={channelLink}>
|
||||
<Tooltip label={<ClaimPreview uri={channelLink} type="small" />}>{inner}</Tooltip>
|
||||
<Tooltip label={'test' || <ClaimPreview uri={channelLink} type="small" />}>{inner}</Tooltip>
|
||||
</Button>
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -67,8 +67,11 @@ const defaultState: AppState = {
|
|||
scrollHistory: [0],
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
// @@router comes from react-router
|
||||
// This action is dispatched any time a user navigates forward or back
|
||||
=======
|
||||
>>>>>>> restore that shit
|
||||
reducers['@@router/LOCATION_CHANGE'] = (state, action) => {
|
||||
const { currentScroll } = state;
|
||||
const scrollHistory = state.scrollHistory.slice();
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
max-width: 1200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: var(--spacing-large);
|
||||
padding-right: var(--spacing-large);
|
||||
padding-bottom: var(--spacing-main-padding);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue