diff --git a/src/pages/Notifications/Scene.js b/src/pages/Notifications/Scene.js index e24d7e1..8b6ad81 100644 --- a/src/pages/Notifications/Scene.js +++ b/src/pages/Notifications/Scene.js @@ -698,7 +698,7 @@ export default function Scene ({ // onClearQuery, // onLogout, // onSearch, - // onMarkAsRead, + onMarkAsRead, // onMarkAllAsStaged, // onFetchNotifications, // onStageThread, @@ -742,6 +742,7 @@ export default function Scene ({ loading={loading} isFirstPage={isFirstPage} isLastPage={isLastPage} + onArchiveThread={onMarkAsRead} {...props} /> ); diff --git a/src/pages/Notifications/redesign/Scene.js b/src/pages/Notifications/redesign/Scene.js index ca6a6b4..a322c14 100644 --- a/src/pages/Notifications/redesign/Scene.js +++ b/src/pages/Notifications/redesign/Scene.js @@ -99,9 +99,6 @@ function getMessageFromReasons (reasons, type) { return 'Something was updated'; } } -// ======================================================================== -// END OF 'MOVE TO A UTILS FILE' -// ======================================================================== function createColorOfScore (min, max) { return function (score) { @@ -119,6 +116,10 @@ function createColorOfScore (min, max) { } } +// ======================================================================== +// END OF 'MOVE TO A UTILS FILE' +// ======================================================================== + const loadingKeyframe = keyframes` 100% { transform: translateX(100%); @@ -736,8 +737,8 @@ export default function Scene ({ onClearCache, setNotificationsPermission, onStageThread, + onArchiveThread, }) { - console.warn('unreadCount', unreadCount) const [menuOpen, setMenuOpen] = React.useState(false); const [dropdownOpen, setDropdownOpen] = React.useState(false); const [mode, setMode] = React.useState(Mode.ALL); @@ -1121,7 +1122,8 @@ export default function Scene ({ notifications={notifications} page={page} colorOfScore={createColorOfScore(lowestScore, highestScore)} - onTitleClick={onStageThread} + markAsRead={onStageThread} + markAsArchived={onArchiveThread} /> )} @@ -1135,7 +1137,8 @@ export default function Scene ({ function NotificationCollection ({ notifications, colorOfScore, - onTitleClick, + markAsRead, + markAsArchived, page }) { const props = useSpring({ @@ -1159,7 +1162,7 @@ function NotificationCollection ({ flex={4} onClick={() => { window.open(item.url); - onTitleClick(item.id, item.repository); + markAsRead(item.id, item.repository); }} css={css` font-weight: 500; @@ -1198,10 +1201,10 @@ function NotificationCollection ({ width: 40px; } `}> - + markAsRead(item.id, item.repository)}> - + markAsArchived(item.id, item.repository)}>