Skip to content

Commit

Permalink
Merge branch 'hotfix/3.13.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Feb 28, 2024
2 parents 93bf2e1 + 592e927 commit 1eec4b6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "worldbrain-extension",
"version": "3.13.6",
"version": "3.13.7",
"homepage": "https://memex.garden",
"repository": "https://github.com/WorldBrain/Memex",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions src/common-ui/components/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ export const OuterDiv = styled.div`
cursor: ${(props) => (props.onClick ? 'pointer' : 'default')};
justify-content: center;
align-items: center;
* {
font-family: 'Satoshi', sans-serif;
font-feature-settings: 'pnum' on, 'lnum' on, 'case' on, 'ss03' on;
}
`

export const InnerDiv = styled.div<{ large: boolean }>`
Expand Down
29 changes: 29 additions & 0 deletions src/dashboard-refactor/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,21 @@ export class DashboardLogic extends UILogic<State, Events> {
previousState,
}) => {
if (event.instaDelete) {
const pageLists =
previousState.searchResults.pageData.byId[event.pageId].lists
const isPageInInbox = pageLists.some(
(listId) =>
this.options.annotationsCache.lists.byId[listId].localId ===
SPECIAL_LIST_IDS.INBOX,
)

if (isPageInInbox) {
this.emitMutation({
listsSidebar: {
inboxUnreadCount: { $apply: (count) => count - 1 },
},
})
}
await executeUITask(
this,
(taskState) => ({
Expand Down Expand Up @@ -1808,6 +1823,20 @@ export class DashboardLogic extends UILogic<State, Events> {

const { pageId, day } = modals.deletingPageArgs

const pageLists = pageData.byId[pageId].lists
const isPageInInbox = pageLists.some(
(listId) =>
this.options.annotationsCache.lists.byId[listId].localId ===
SPECIAL_LIST_IDS.INBOX,
)

if (isPageInInbox) {
this.emitMutation({
listsSidebar: {
inboxUnreadCount: { $apply: (count) => count - 1 },
},
})
}
await executeUITask(
this,
(taskState) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,13 @@ export default class PageResultView extends PureComponent<Props> {
let instaDelete = false

if (event.shiftKey) {
event.preventDefault()
event.stopPropagation()
instaDelete = true
}
this.props.onTrashBtnClick(instaDelete)
event.preventDefault()
event.stopPropagation()
}}
/>
</TooltipBox>
Expand Down

0 comments on commit 1eec4b6

Please sign in to comment.