mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-23 15:20:55 +01:00
Merge branch 'notio' of https://github.com/BlueWallet/BlueWallet into notio
This commit is contained in:
commit
63a98b87cb
1 changed files with 23 additions and 18 deletions
|
@ -41,6 +41,7 @@ const NotificationSettings: React.FC = () => {
|
|||
};
|
||||
|
||||
const onNotificationsSwitch = async (value: boolean) => {
|
||||
try {
|
||||
setNotificationsEnabled(value);
|
||||
if (value) {
|
||||
// User is enabling notifications
|
||||
|
@ -64,6 +65,10 @@ const NotificationSettings: React.FC = () => {
|
|||
|
||||
// @ts-ignore: refactor later
|
||||
setNotificationsEnabled(await Notifications.isNotificationsEnabled());
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
presentAlert({ message: error.message });
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue