MCPcopy Create free account
hub / github.com/CommE2E/comm / resetBadgeCount

Method resetBadgeCount

native/push/push-handler.react.js:424–446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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') {

Callers 1

componentDidUpdateMethod · 0.95

Calls 4

setBadgeMethod · 0.80
keysMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected