Merge remote-tracking branch 'origin/la/fix-archivebox' into release/next-sys

This commit is contained in:
Philip Monk 2020-12-18 12:55:08 -08:00
commit 39cc1c51ec
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
5 changed files with 4 additions and 27 deletions

View File

@ -196,12 +196,10 @@ export class HarkApi extends BaseApi<StoreState> {
});
}
getMore(archive = false) {
const offset = this.store.state[
archive ? 'archivedNotifications' : 'notifications'
]?.size || 0;
getMore() {
const offset = this.store.state['notifications']?.size || 0;
const count = 3;
return this.getSubset(offset,count, archive);
return this.getSubset(offset, count, false);
}
async getSubset(offset:number, count:number, isArchive: boolean) {

View File

@ -363,12 +363,5 @@ function archive(json: any, state: HarkState) {
notifIdxEqual(index, idxNotif.index)
);
state.notifications.set(time, unarchived);
state.archivedNotifications.set(time, [
...archiveBox,
...archived.map(({ notification, index }) => ({
notification: { ...notification, read: true },
index,
})),
]);
}
}

View File

@ -148,7 +148,6 @@ export default function Inbox(props: {
api={api}
/>
)}
{_.map(
notificationsByDay,
(timeboxes, idx) =>

View File

@ -100,7 +100,7 @@ function NotificationWrapper(props: {
</StatelessAsyncAction>
{!props.archived && (
<StatelessAsyncAction name={time.toString()} onClick={onArchive} backgroundColor="transparent">
Archive
Dismiss
</StatelessAsyncAction>
)}
</Row>

View File

@ -70,11 +70,6 @@ export default function NotificationsScreen(props: any) {
Inbox
</HeaderLink>
</Box>
<Box>
<HeaderLink current={view} view="archive">
Archive
</HeaderLink>
</Box>
<Box>
<HeaderLink current={view} view="preferences">
Preferences
@ -115,14 +110,6 @@ export default function NotificationsScreen(props: any) {
</Box>
</Dropdown>
</Row>
{view === "archive" && (
<Inbox
{...props}
archive={props.archivedNotifications}
showArchive
filter={filter.groups}
/>
)}
{view === "preferences" && (
<NotificationPreferences
graphConfig={props.notificationsGraphConfig}