mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
repositions device notification registering
This commit is contained in:
parent
bf8d3b8553
commit
40bc598f16
@ -433,11 +433,11 @@ class ApplicationContainer extends Component {
|
||||
|
||||
|
||||
_fetchApp = async () => {
|
||||
this._initNotificationSettings();
|
||||
await this._getSettings();
|
||||
this._refreshGlobalProps();
|
||||
await this._getUserDataFromRealm();
|
||||
this._compareAndPromptForUpdate();
|
||||
this._registerDeviceForNotifications();
|
||||
};
|
||||
|
||||
_pushNavigate = (notification) => {
|
||||
@ -800,24 +800,20 @@ class ApplicationContainer extends Component {
|
||||
);
|
||||
|
||||
dispatch(changeAllNotificationSettings(settings));
|
||||
this._initNotificationSettings(settings);
|
||||
}
|
||||
|
||||
dispatch(setSettingsMigrated(true))
|
||||
await dispatch(setSettingsMigrated(true))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
//update notification settings and update push token for each signed accoutn useing access tokens
|
||||
_initNotificationSettings = (settings?:any) => {
|
||||
_registerDeviceForNotifications = (settings?:any) => {
|
||||
const { otherAccounts, notificationDetails, isNotificationsEnabled } = this.props;
|
||||
|
||||
if(!settings){
|
||||
settings = notificationDetails;
|
||||
}
|
||||
|
||||
|
||||
const isEnabled = settings ? !!settings.notification : isNotificationsEnabled;
|
||||
settings = settings || notificationDetails;
|
||||
|
||||
|
||||
//updateing fcm token with settings;
|
||||
|
Loading…
Reference in New Issue
Block a user