Skip to content

Commit 580670c

Browse files
committed
notif: Make directory, and move out of "utils".
A name like "util" or "utils" or "lib" is pretty unhelpful in general, carrying nearly no meaning. Making a directory will help us organize other notifications-related code.
1 parent d76169b commit 580670c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/boot/AppEventHandlers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {
1414
UserIdMap,
1515
} from '../types';
1616
import { getSession, getUnreadByHuddlesMentionsAndPMs, getUsersById } from '../selectors';
17-
import { handleInitialNotification, NotificationListener } from '../utils/notifications';
17+
import { handleInitialNotification, NotificationListener } from '../notification';
1818
import {
1919
appOnline,
2020
appOrientation,

src/nav/navReducers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {
1111
import config from '../config';
1212
import { navigateToChat } from './navActions';
1313
import { getUsersById } from '../users/userSelectors';
14-
import { getNarrowFromNotificationData } from '../utils/notifications';
14+
import { getNarrowFromNotificationData } from '../notification';
1515
import AppNavigator from './AppNavigator';
1616
import { NULL_NAV_STATE } from '../nullObjects';
1717
import {

src/utils/__tests__/notifications-test.js src/notification/__tests__/notification-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getNarrowFromNotificationData, handleNotificationMuddle } from '../notifications';
2-
import { HOME_NARROW, topicNarrow, privateNarrow, groupNarrow } from '../narrow';
1+
import { getNarrowFromNotificationData, handleNotificationMuddle } from '..';
2+
import { HOME_NARROW, topicNarrow, privateNarrow, groupNarrow } from '../../utils/narrow';
33

44
describe('getNarrowFromNotificationData', () => {
55
test('unknown notification data returns home narrow', () => {

src/utils/notifications.js src/notification/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Auth, Dispatch, Notification, NotificationGroup, UserIdMap } from
66
import { HOME_NARROW, topicNarrow, privateNarrow, groupNarrow } from '../utils/narrow';
77
import config from '../config';
88
import { registerPush, unregisterPush } from '../api';
9-
import { logErrorRemotely } from './logging';
9+
import { logErrorRemotely } from '../utils/logging';
1010
import { doNarrow } from '../message/messagesActions';
1111

1212
const getGroupNarrowFromNotificationData = (data: NotificationGroup, usersById: UserIdMap = {}) => {

src/realm/realmActions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {
1515
import {
1616
getNotificationToken,
1717
tryStopNotifications as innerStopNotifications,
18-
} from '../utils/notifications';
18+
} from '../notification';
1919
import { getAuth, getPushToken } from '../selectors';
2020
import { getRealmEmojis, getRealmFilters } from '../api';
2121
import {

0 commit comments

Comments
 (0)