()
| 422 | } |
| 423 | |
| 424 | async resetBadgeCount() { |
| 425 | const keyserversDataToRemove = Object.keys( |
| 426 | this.props.thinThreadsUnreadCount, |
| 427 | ); |
| 428 | try { |
| 429 | await commCoreModule.removeDataFromNotifStorage(keyserversDataToRemove); |
| 430 | } catch (e) { |
| 431 | if (__DEV__) { |
| 432 | Alert.alert( |
| 433 | 'MMKV error', |
| 434 | 'Failed to remove keyserver from MMKV.' + e.message, |
| 435 | ); |
| 436 | } |
| 437 | console.log(e); |
| 438 | return; |
| 439 | } |
| 440 | |
| 441 | if (Platform.OS === 'ios') { |
| 442 | CommIOSNotifications.setBadgesCount(0); |
| 443 | } else if (Platform.OS === 'android') { |
| 444 | CommAndroidNotifications.setBadge(0); |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | clearAllNotifs() { |
| 449 | if (Platform.OS === 'ios') { |
no test coverage detected