mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-25 06:13:12 +03:00
added appcenter pusisable
This commit is contained in:
parent
eed54f3505
commit
d5a16b13ec
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
||||
import { Platform } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
import AppCenter from 'appcenter';
|
||||
import Push from 'appcenter-push';
|
||||
import { Client } from 'dsteem';
|
||||
|
||||
// Realm
|
||||
@ -135,8 +136,7 @@ class SettingsContainer extends Component {
|
||||
|
||||
switch (actionType) {
|
||||
case 'notification':
|
||||
dispatch(isNotificationOpen(action));
|
||||
setNotificationIsOpen(action);
|
||||
this._handleNotification(action);
|
||||
break;
|
||||
|
||||
case 'theme':
|
||||
@ -148,6 +148,17 @@ class SettingsContainer extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_handleNotification = async (action) => {
|
||||
const { dispatch } = this.props;
|
||||
|
||||
dispatch(isNotificationOpen(action));
|
||||
setNotificationIsOpen(action);
|
||||
|
||||
const isPushEnabled = await Push.isEnabled();
|
||||
|
||||
await Push.setEnabled(!isPushEnabled);
|
||||
};
|
||||
|
||||
_handleButtonPress = (action, actionType) => {
|
||||
const { dispatch, setPinCodeState } = this.props;
|
||||
switch (actionType) {
|
||||
|
Loading…
Reference in New Issue
Block a user