Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
fix: filter out deleted themes before attempting to display
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Dec 5, 2021
1 parent d483769 commit 9359f55
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "standardnotes-mobile",
"version": "3.9.3",
"user-version": "3.9.3",
"version": "3.9.4",
"user-version": "3.9.4",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand All @@ -26,7 +26,7 @@
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"@standardnotes/sncrypto-common": "1.5.2",
"@standardnotes/snjs": "2.17.9",
"@standardnotes/snjs": "2.19.5",
"js-base64": "^3.5.2",
"moment": "^2.29.1",
"react": "17.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Compose/ComponentView.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const LockedContainer = styled.View`
flex-direction: row;
align-items: center;
padding: 10px;
background-color: ${({ theme }) => theme.stylekitDangerColor};
background-color: ${({ theme }) => theme.stylekitWarningColor};
border-bottom-color: ${({ theme }) => theme.stylekitBorderColor};
border-bottom-width: 1px;
`;
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Compose/ComponentView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export const ComponentView = ({
<LockedContainer>
<StyledIcon />
<LockedText>
Extended expired. Editors are in a read-only state. To edit
Subscription expired. Editors are in a read-only state. To edit
immediately, please switch to the Plain Editor.
</LockedText>
</LockedContainer>
Expand Down
15 changes: 8 additions & 7 deletions src/screens/SideMenu/MainSideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ export const MainSideMenu = React.memo(({ drawerRef }: Props) => {
const unsubscribeStreamThemes = application?.streamItems(
ContentType.Theme,
() => {
const newItems = application.getItems(ContentType.Theme);
const newItems = application
.getItems(ContentType.Theme)
.filter(el => !el.errorDecrypting && !el.deleted);
setThemes(newItems as SNTheme[]);
}
);
Expand Down Expand Up @@ -198,7 +200,6 @@ export const MainSideMenu = React.memo(({ drawerRef }: Props) => {
}))
.concat(
themes
.filter(el => !el.errorDecrypting)
.sort((a, b) => a.name.localeCompare(b.name))
.map(mapTheme => ({
text: mapTheme.name,
Expand Down Expand Up @@ -262,11 +263,11 @@ export const MainSideMenu = React.memo(({ drawerRef }: Props) => {
const outOfSyncPressed = async () => {
const confirmed = await application!.alertService!.confirm(
"We've detected that the data in the current application session may " +
'not match the data on the server. This can happen due to poor' +
'network conditions, or if a large note fails to download on your ' +
'device. To resolve this issue, we recommend first creating a backup ' +
'of your data in the Settings screen, then signing out of your account ' +
'and signing back in.',
'not match the data on the server. This can happen due to poor' +
'network conditions, or if a large note fails to download on your ' +
'device. To resolve this issue, we recommend first creating a backup ' +
'of your data in the Settings screen, then signing out of your account ' +
'and signing back in.',
'Potentially Out of Sync',
'Open Settings',
undefined
Expand Down
21 changes: 11 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@
dependencies:
"@sinonjs/commons" "^1.7.0"

"@standardnotes/auth@^3.8.1":
"@standardnotes/auth@3.8.3", "@standardnotes/auth@^3.8.1":
version "3.8.3"
resolved "https://registry.yarnpkg.com/@standardnotes/auth/-/auth-3.8.3.tgz#6e627c1a1a9ebf91d97f52950d099bf7704382e3"
integrity sha512-wz056b3pv8IIX74lYaqjCUvnw3NSow+ex5pn/VlGxg8r7gq19WsmgyXP2BoE7nqKddO1JMlFok+4gdnutYF0Cw==
Expand All @@ -1639,11 +1639,12 @@
dependencies:
"@standardnotes/auth" "^3.8.1"

"@standardnotes/features@^1.8.2":
version "1.8.2"
resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.8.2.tgz#ecc8162ca80ee3740468aa55a64c23b519c13505"
integrity sha512-EYeYYT/WBIh7fMVTVhsy0INjVdyHVtnH90pbZQHNPpsUkLdj05DzuyxUKjsc0oxiskmZjPOVSfXt8l3RL5Av4g==
"@standardnotes/features@^1.10.1":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@standardnotes/features/-/features-1.10.1.tgz#5b5a59d2d69751ca040a270d04a08662b1591bfc"
integrity sha512-fN7WyR8jeaAsDWkm4a6SSz3JZeaNfL+CkmWAYqxRI5XoXZlWy+kBVaYWaGe7vI4T6ncwdhxRTjE7mirG4PEQ6g==
dependencies:
"@standardnotes/auth" "3.8.3"
"@standardnotes/common" "^1.2.1"

"@standardnotes/settings@^1.2.1":
Expand All @@ -1656,15 +1657,15 @@
resolved "https://registry.yarnpkg.com/@standardnotes/sncrypto-common/-/sncrypto-common-1.5.2.tgz#be9404689d94f953c68302609a4f76751eaa82cd"
integrity sha512-+OQ6gajTcVSHruw33T52MHyBDKL1vRCfQBXQn4tt4+bCfBAe+PFLkEQMHp35bg5twCfg9+wUf2KhmNNSNyBBZw==

"@standardnotes/snjs@2.17.9":
version "2.17.9"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.17.9.tgz#9e7402252c6acda6471cc9d887516f17b6bd2cb2"
integrity sha512-Hi57vIByRD5qEOFfQrq/qILH5qRgngyn57qhHE2yKDsX//CTDsdqKGKVZbG0W54rQ+JxYUfjAuBPR/pxIVTi6w==
"@standardnotes/snjs@2.19.5":
version "2.19.5"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.19.5.tgz#5765aa97e8b2de246d3c8a5b64a938993bcc75ea"
integrity sha512-bjQGa69xVWjBZWj2c6nG5BXvIcFwQXzghIXOPNUHe9ljQtU6gCUAYjeNZ+nQiry1tnNuds6IteeZNq3f4L/duw==
dependencies:
"@standardnotes/auth" "^3.8.1"
"@standardnotes/common" "^1.2.1"
"@standardnotes/domain-events" "^2.5.1"
"@standardnotes/features" "^1.8.2"
"@standardnotes/features" "^1.10.1"
"@standardnotes/settings" "^1.2.1"
"@standardnotes/sncrypto-common" "^1.5.2"

Expand Down

0 comments on commit 9359f55

Please sign in to comment.