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

Commit

Permalink
chore: upgrade dependencies (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
vardan-arm committed Apr 19, 2022
1 parent 7b9509c commit b4ca62f
Show file tree
Hide file tree
Showing 8 changed files with 275 additions and 196 deletions.
26 changes: 13 additions & 13 deletions package.json
Expand Up @@ -31,14 +31,14 @@
"@react-navigation/elements": "^1.3.3",
"@react-navigation/native": "^6.0.10",
"@react-navigation/stack": "^6.2.1",
"@standardnotes/components": "^1.7.14",
"@standardnotes/filepicker": "^1.10.6",
"@standardnotes/components": "^1.7.15",
"@standardnotes/filepicker": "^1.11.0",
"@standardnotes/react-native-aes": "^1.4.3",
"@standardnotes/react-native-textview": "1.0.2",
"@standardnotes/react-native-utils": "1.0.1",
"@standardnotes/sncrypto-common": "1.7.5",
"@standardnotes/snjs": "2.94.3",
"@standardnotes/stylekit": "5.21.3",
"@standardnotes/sncrypto-common": "1.7.6",
"@standardnotes/snjs": "2.96.2",
"@standardnotes/stylekit": "5.23.0",
"@types/styled-components-react-native": "5.1.3",
"js-base64": "^3.7.2",
"moment": "^2.29.2",
Expand Down Expand Up @@ -79,9 +79,9 @@
"styled-components": "5.3.5"
},
"devDependencies": {
"@babel/core": "^7.17.8",
"@babel/core": "^7.17.9",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.17.8",
"@babel/runtime": "^7.17.9",
"@react-native-community/eslint-config": "^3.0.1",
"@types/detox": "^18.1.0",
"@types/faker": "^6.6.9",
Expand All @@ -90,22 +90,22 @@
"@types/react-native": "^0.67.3",
"@types/react-native-vector-icons": "^6.4.10",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"babel-jest": "^27.5.1",
"concurrently": "^7.1.0",
"detox": "^19.5.7",
"eslint": "^8.12.0",
"eslint": "^8.13.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-prettier": "^4.0.0",
"faker": "^6.6.6",
"jest": "^27.5.1",
"jest-circus": "^27.5.1",
"metro-react-native-babel-preset": "^0.70.0",
"npm-check-updates": "^12.5.7",
"metro-react-native-babel-preset": "^0.70.1",
"npm-check-updates": "^12.5.9",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"pod-install": "^0.1.32",
"pod-install": "^0.1.33",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.6.0",
"prettier-plugin-organize-imports": "^2.3.4",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/application_state.ts
Expand Up @@ -9,7 +9,7 @@ import {
ContentType,
isNullOrUndefined,
NoteViewController,
PayloadSource,
PayloadEmitSource,
removeFromArray,
SmartView,
SNNote,
Expand Down Expand Up @@ -378,8 +378,8 @@ export class ApplicationState extends ApplicationService {
[ContentType.Note, ContentType.Tag],
async ({ changed, inserted, removed, source }) => {
if (
source === PayloadSource.PreSyncSave ||
source === PayloadSource.RemoteRetrieved
source === PayloadEmitSource.PreSyncSave ||
source === PayloadEmitSource.RemoteRetrieved
) {
const removedNotes = removed.filter(
i => i.content_type === ContentType.Note
Expand Down
4 changes: 2 additions & 2 deletions src/screens/Compose/Compose.tsx
Expand Up @@ -13,7 +13,7 @@ import {
isPayloadSourceRetrieved,
ItemMutator,
NoteMutator,
PayloadSource,
PayloadEmitSource,
SNComponent,
} from '@standardnotes/snjs';
import { ICON_ALERT, ICON_LOCK } from '@Style/icons';
Expand Down Expand Up @@ -100,7 +100,7 @@ export class Compose extends React.Component<{}, State> {
}

const isTemplateNoteInsertedToBeInteractableWithEditor =
source === PayloadSource.Constructor && note.dirty;
source === PayloadEmitSource.LocalInserted && note.dirty;
if (isTemplateNoteInsertedToBeInteractableWithEditor) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/screens/NoteHistory/NoteHistoryPreview.tsx
Expand Up @@ -6,7 +6,7 @@ import {
SCREEN_NOTES,
SCREEN_NOTE_HISTORY_PREVIEW,
} from '@Screens/screens';
import { ButtonType, PayloadSource, SNNote } from '@standardnotes/snjs';
import { ButtonType, PayloadEmitSource, SNNote } from '@standardnotes/snjs';
import { useCustomActionSheet } from '@Style/custom_action_sheet';
import { ELIPSIS } from '@Style/icons';
import { ThemeService } from '@Style/theme_service';
Expand Down Expand Up @@ -58,10 +58,10 @@ export const NoteHistoryPreview = ({
await application?.mutator.changeAndSaveItem(
originalNote,
mutator => {
mutator.unsafe_setCustomContent(revision.payload.content);
mutator.setCustomContent(revision.payload.content);
},
true,
PayloadSource.RemoteActionRetrieved
PayloadEmitSource.RemoteRetrieved
);
if (application?.getAppState().isTabletDevice) {
// @ts-expect-error
Expand Down
8 changes: 4 additions & 4 deletions src/screens/SideMenu/NoteSideMenu.tsx
Expand Up @@ -26,7 +26,7 @@ import {
FeatureStatus,
NoteMutator,
NoteViewController,
PayloadSource,
PayloadEmitSource,
PrefKey,
SmartView,
SNComponent,
Expand Down Expand Up @@ -232,7 +232,7 @@ export const NoteSideMenu = React.memo((props: Props) => {
const removeObserver = editor?.addNoteInnerValueChangeObserver(
(newNote, source) => {
if (mounted && props.drawerOpen) {
if (source !== PayloadSource.ComponentRetrieved) {
if (source !== PayloadEmitSource.ComponentRetrieved) {
setNote(newNote);
}
}
Expand Down Expand Up @@ -404,8 +404,8 @@ export const NoteSideMenu = React.memo((props: Props) => {
}
},
},
]
})
],
});
},
[application, showActionSheet]
);
Expand Down
6 changes: 6 additions & 0 deletions src/style/MobileTheme.ts
Expand Up @@ -25,6 +25,8 @@ export class MobileTheme extends SNTheme {
}

static BuildTheme(variables?: MobileThemeVariables) {
const currentDate = new Date();

return new MobileTheme(
new DecryptedPayload({
uuid: `${Math.random()}`,
Expand All @@ -34,6 +36,10 @@ export class MobileTheme extends SNTheme {
isSystemTheme: false,
isInitial: false,
}),
created_at: currentDate,
created_at_timestamp: currentDate.getTime(),
updated_at: currentDate,
updated_at_timestamp: currentDate.getTime(),
})
);
}
Expand Down
5 changes: 5 additions & 0 deletions src/style/theme_service.ts
Expand Up @@ -149,6 +149,7 @@ export class ThemeService {
variables.statusBar =
Platform.OS === 'android' ? LIGHT_CONTENT : DARK_CONTENT;

const currentDate = new Date();
const payload = new DecryptedPayload<ComponentContent>({
uuid: option.uuid,
content_type: ContentType.Theme,
Expand All @@ -168,6 +169,10 @@ export class ThemeService {
isSystemTheme: true,
isInitial: Boolean(option.isInitial),
} as unknown as ComponentContent),
created_at: currentDate,
created_at_timestamp: currentDate.getTime(),
updated_at: currentDate,
updated_at_timestamp: currentDate.getTime(),
});

const theme = new MobileTheme(payload);
Expand Down

0 comments on commit b4ca62f

Please sign in to comment.