mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 17:09:13 +03:00
fixed notification not open right page
This commit is contained in:
parent
bec392f15d
commit
46efdc8027
@ -10,6 +10,12 @@ public class SplashActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras != null) {
|
||||
intent.putExtras(extras);
|
||||
}
|
||||
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
@ -64,7 +64,6 @@ import {
|
||||
logoutDone,
|
||||
openPinCodeModal,
|
||||
setConnectivityStatus,
|
||||
setAnalyticsStatus,
|
||||
setPinCode as savePinCode,
|
||||
isRenderRequired,
|
||||
logout,
|
||||
@ -87,22 +86,12 @@ import lightTheme from '../../../themes/lightTheme';
|
||||
import persistAccountGenerator from '../../../utils/persistAccountGenerator';
|
||||
import parseVersionNumber from '../../../utils/parseVersionNumber';
|
||||
import { setMomentLocale } from '../../../utils/time';
|
||||
import parseAuthUrl from '../../../utils/parseAuthUrl';
|
||||
import { purgeExpiredCache } from '../../../redux/actions/cacheActions';
|
||||
import { fetchSubscribedCommunities } from '../../../redux/actions/communitiesAction';
|
||||
import MigrationHelpers from '../../../utils/migrationHelpers';
|
||||
import { deepLinkParser } from '../../../utils/deepLinkParser';
|
||||
import bugsnapInstance from '../../../config/bugsnag';
|
||||
|
||||
// Workaround
|
||||
let previousAppState = 'background';
|
||||
export const setPreviousAppState = () => {
|
||||
previousAppState = AppState.currentState;
|
||||
const appStateTimeout = setTimeout(() => {
|
||||
previousAppState = AppState.currentState;
|
||||
clearTimeout(appStateTimeout);
|
||||
}, 500);
|
||||
};
|
||||
|
||||
let firebaseOnNotificationOpenedAppListener = null;
|
||||
let firebaseOnMessageListener = null;
|
||||
@ -131,7 +120,7 @@ class ApplicationContainer extends Component {
|
||||
});
|
||||
|
||||
AppState.addEventListener('change', this._handleAppStateChange);
|
||||
setPreviousAppState();
|
||||
// setPreviousAppState();
|
||||
|
||||
this.removeAppearanceListener = Appearance.addChangeListener(this._appearanceChangeListener);
|
||||
|
||||
@ -358,7 +347,7 @@ class ApplicationContainer extends Component {
|
||||
let key = null;
|
||||
let routeName = null;
|
||||
|
||||
if (previousAppState !== 'active' && !!notification) {
|
||||
if (!!notification) {
|
||||
const push = get(notification, 'data');
|
||||
const type = get(push, 'type', '');
|
||||
const fullPermlink =
|
||||
|
Loading…
Reference in New Issue
Block a user