Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32268955
D3388.1765254062.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3388.1765254062.diff
View Options
diff --git a/web/sidebar/app-switcher.react.js b/web/sidebar/app-switcher.react.js
--- a/web/sidebar/app-switcher.react.js
+++ b/web/sidebar/app-switcher.react.js
@@ -1,6 +1,5 @@
// @flow
-import invariant from 'invariant';
import * as React from 'react';
import { useDispatch } from 'react-redux';
@@ -20,7 +19,7 @@
state => state.navInfo.activeChatThreadID,
);
const mostRecentlyReadThread = useSelector(mostRecentlyReadThreadSelector);
- const activeThreadCurrentlyUnread = useSelector(
+ const isActiveThreadCurrentlyUnread = useSelector(
state =>
!activeChatThreadID ||
!!state.threadStore.threadInfos[activeChatThreadID]?.currentUser.unread,
@@ -35,7 +34,7 @@
type: updateNavInfoActionType,
payload: {
tab: 'chat',
- activeChatThreadID: activeThreadCurrentlyUnread
+ activeChatThreadID: isActiveThreadCurrentlyUnread
? mostRecentlyReadThread
: activeChatThreadID,
},
@@ -43,19 +42,14 @@
},
[
dispatch,
- activeThreadCurrentlyUnread,
+ isActiveThreadCurrentlyUnread,
mostRecentlyReadThread,
activeChatThreadID,
],
);
- const viewerID = useSelector(
- state => state.currentUserInfo && state.currentUserInfo.id,
- );
-
const boundUnreadCount = useSelector(unreadCount);
- invariant(viewerID, 'should be set');
let chatBadge = null;
if (boundUnreadCount > 0) {
chatBadge = <span className={css.chatBadge}>{boundUnreadCount}</span>;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 9, 4:21 AM (2 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5852524
Default Alt Text
D3388.1765254062.diff (1 KB)
Attached To
Mode
D3388: [web] Address remaining code review comments from D3341
Attached
Detach File
Event Timeline
Log In to Comment