From 55c144886e71412c0f48ae4f4543bfbe1a5b07fa Mon Sep 17 00:00:00 2001 From: Felix Hallenberg Date: Sun, 29 Oct 2023 09:05:20 +0200 Subject: [PATCH 01/21] Add device-info package to detect notches - Update pods --- ios/Podfile.lock | 6 ++ package-lock.json | 138 +++++++++++++++++++++++++--------------------- package.json | 1 + 3 files changed, 81 insertions(+), 64 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 623ae4f7..3fcf2d0f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -495,6 +495,8 @@ PODS: - React-perflogger (= 0.71.6) - RNCAsyncStorage (1.18.1): - React-Core + - RNDeviceInfo (10.11.0): + - React-Core - RNFBApp (18.3.2): - Firebase/CoreOnly (= 10.14.0) - React-Core @@ -605,6 +607,7 @@ DEPENDENCIES: - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)" + - RNDeviceInfo (from `../node_modules/react-native-device-info`) - "RNFBApp (from `../node_modules/@react-native-firebase/app`)" - "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)" - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) @@ -715,6 +718,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon" RNCAsyncStorage: :path: "../node_modules/@react-native-async-storage/async-storage" + RNDeviceInfo: + :path: "../node_modules/react-native-device-info" RNFBApp: :path: "../node_modules/@react-native-firebase/app" RNFBMessaging: @@ -789,6 +794,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: 8692ac548bec648fa121980ccb4304afd136d584 ReactCommon: 0c43eaeaaee231d7d8dc24fc5a6e4cf2b75bf196 RNCAsyncStorage: b90b71f45b8b97be43bc4284e71a6af48ac9f547 + RNDeviceInfo: bf8a32acbcb875f568217285d1793b0e8588c974 RNFBApp: 0b534885354024f4d171ede8da04521d81bc1767 RNFBMessaging: a2ebefff4dd99eba6b16105bbc0b931bfdb0ce74 RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39 diff --git a/package-lock.json b/package-lock.json index 9ac4ccd0..f9aaa4df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "monocle-ts": "2.3.13", "react": "18.2.0", "react-native": "0.71.6", + "react-native-device-info": "^10.11.0", "react-native-flipper": "0.164.0", "react-native-gesture-handler": "2.9.0", "react-native-reanimated": "3.0.2", @@ -88,11 +89,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" @@ -163,11 +165,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dependencies": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -283,9 +285,9 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "engines": { "node": ">=6.9.0" } @@ -302,23 +304,23 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -439,28 +441,28 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -501,12 +503,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -514,9 +516,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1869,31 +1871,31 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", - "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1902,12 +1904,12 @@ } }, "node_modules/@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -14765,9 +14767,9 @@ } }, "node_modules/react-devtools-core": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.27.4.tgz", - "integrity": "sha512-dvZjrAJjahd6NNl7dDwEk5TyHsWJxDpYL7VnD9jdEr98EEEsVhw9G8JDX54Nrb3XIIOBlJDpjo3AuBuychX9zg==", + "version": "4.28.5", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-4.28.5.tgz", + "integrity": "sha512-cq/o30z9W2Wb4rzBefjv5fBalHU0rJGZCHAkf/RHSBWSSYwh8PlQTqqOJmgIIbBtpj27T6FIPXeomIjZtCNVqA==", "dependencies": { "shell-quote": "^1.6.1", "ws": "^7" @@ -14850,6 +14852,14 @@ "nullthrows": "^1.1.1" } }, + "node_modules/react-native-device-info": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-10.11.0.tgz", + "integrity": "sha512-qRzhuYOm5ZXQi5dhfJFjDq157oipxcEW/fo0QyMm5+TI6V6/+P/tju+Hif6z0rpLCf7MV7iDVRv2Kqha4D/yvQ==", + "peerDependencies": { + "react-native": "*" + } + }, "node_modules/react-native-flipper": { "version": "0.164.0", "resolved": "https://registry.npmjs.org/react-native-flipper/-/react-native-flipper-0.164.0.tgz", diff --git a/package.json b/package.json index 2791c433..c7a433cc 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "monocle-ts": "2.3.13", "react": "18.2.0", "react-native": "0.71.6", + "react-native-device-info": "^10.11.0", "react-native-flipper": "0.164.0", "react-native-gesture-handler": "2.9.0", "react-native-reanimated": "3.0.2", From 726be4b8886a3b1756eb5e42c5e46be6fa2f3b61 Mon Sep 17 00:00:00 2001 From: Felix Hallenberg Date: Sun, 29 Oct 2023 09:05:37 +0200 Subject: [PATCH 02/21] Update read-more text to be more accurate --- src/localization/en.ts | 3 +-- src/localization/fi.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/localization/en.ts b/src/localization/en.ts index 9d762d1f..fe6d0e53 100644 --- a/src/localization/en.ts +++ b/src/localization/en.ts @@ -6,8 +6,7 @@ export const messages: { [key in MessageId]: string } = { 'components.createdBySosBanner': 'Brought to you by SOS-Lapsikylä', - 'components.mentorCard.readMore': 'Read more', - 'components.mentorCard.showMore': 'Show more...', + 'components.mentorCard.readMore': 'Show mentor', 'components.mentorCard.yearsAbbrev': ' y/o', 'components.mentorSkills.other': 'I can also help with:', diff --git a/src/localization/fi.ts b/src/localization/fi.ts index 482e62c3..9ecd508a 100644 --- a/src/localization/fi.ts +++ b/src/localization/fi.ts @@ -5,8 +5,7 @@ export const messages = { 'components.createdBySosBanner': 'Palvelun tarjoaa SOS-Lapsikylä', - 'components.mentorCard.readMore': 'Lue lisää', - 'components.mentorCard.showMore': 'Näytä lisää...', + 'components.mentorCard.readMore': 'Näytä mentori', 'components.mentorCard.yearsAbbrev': 'v.', 'components.mentorSkills.other': 'Pystyn auttamaan näissä:', From ad6047d961868529112b3bb6a575e381959563ed Mon Sep 17 00:00:00 2001 From: Felix Hallenberg Date: Sun, 29 Oct 2023 09:13:01 +0200 Subject: [PATCH 03/21] Adjust some paddings based on notches, not platform --- src/Screens/Main/Chat/Title.tsx | 8 ++++---- src/Screens/components/OnboardingBackground.tsx | 4 ++-- src/lib/isDevice.ts | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Screens/Main/Chat/Title.tsx b/src/Screens/Main/Chat/Title.tsx index a4f6320f..b149a31f 100644 --- a/src/Screens/Main/Chat/Title.tsx +++ b/src/Screens/Main/Chat/Title.tsx @@ -8,7 +8,7 @@ import * as state from '../../../state'; import * as selectors from '../../../state/selectors'; import { getMentorByUserId } from '../../../state/reducers/mentors'; -import { isDevice } from '../../../lib/isDevice'; +import { hasNotch } from '../../../lib/isDevice'; import colors from '../../components/colors'; import fonts from '../../components/fonts'; @@ -47,7 +47,7 @@ const Title: React.FC = ({ onLayout={onLayout} style={[ styles.blob, - isDevice('ios') ? styles.iosPadding : styles.androidPadding, + hasNotch() ? styles.notchPadding : styles.padding, style, ]} > @@ -119,10 +119,10 @@ const styles = RN.StyleSheet.create({ alignItems: 'center', backgroundColor: colors.darkBlue, }, - androidPadding: { + padding: { paddingVertical: 16, }, - iosPadding: { + notchPadding: { paddingTop: 16, }, safeArea: { diff --git a/src/Screens/components/OnboardingBackground.tsx b/src/Screens/components/OnboardingBackground.tsx index a4b05cf4..576f3fd1 100644 --- a/src/Screens/components/OnboardingBackground.tsx +++ b/src/Screens/components/OnboardingBackground.tsx @@ -2,7 +2,7 @@ import React from 'react'; import RN from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { isDevice } from '../../lib/isDevice'; +import { hasNotch } from '../../lib/isDevice'; import Background from './Background'; import CreatedBySosBanner from '../components/CreatedBySosBanner'; @@ -34,7 +34,7 @@ const OnboardinBackground: React.FC = ({ const styles = RN.StyleSheet.create({ appTitle: { position: 'absolute', - top: isDevice('ios') ? 64 : 40, + top: hasNotch() ? 64 : 40, alignSelf: 'center', zIndex: 1, }, diff --git a/src/lib/isDevice.ts b/src/lib/isDevice.ts index 37df9a3a..df7f15a1 100644 --- a/src/lib/isDevice.ts +++ b/src/lib/isDevice.ts @@ -1,5 +1,8 @@ import RN from 'react-native'; import { PlatformOSType } from 'react-native/types'; +import Device from 'react-native-device-info'; export const isDevice = (platform: PlatformOSType) => platform === RN.Platform.OS; + +export const hasNotch = () => Device.hasNotch(); From 22b798d0005762a62d0af50968272dffab8ea001 Mon Sep 17 00:00:00 2001 From: Felix Hallenberg Date: Sun, 29 Oct 2023 09:28:49 +0200 Subject: [PATCH 04/21] Update button-texts to make sense out of context - Instead of 'OK', we show 'Archive' etc in modal primaryButton-text - Instead of 'Save' we show 'Change password' etc in forms --- src/Screens/Main/Chat/chatProperties.ts | 24 +++++++++++++++---- src/Screens/Main/Chat/index.tsx | 1 - src/Screens/Main/FolderedChats/index.tsx | 2 +- src/Screens/Main/Settings/Email/EmailForm.tsx | 2 +- src/Screens/Main/Settings/Email/index.tsx | 15 +----------- .../Main/Settings/Password/PasswordForm.tsx | 2 +- src/Screens/Main/Settings/Password/index.tsx | 1 - src/localization/en.ts | 10 ++++++-- src/localization/fi.ts | 8 ++++++- 9 files changed, 39 insertions(+), 26 deletions(-) diff --git a/src/Screens/Main/Chat/chatProperties.ts b/src/Screens/Main/Chat/chatProperties.ts index 41c4d942..a4925db8 100644 --- a/src/Screens/Main/Chat/chatProperties.ts +++ b/src/Screens/Main/Chat/chatProperties.ts @@ -4,18 +4,22 @@ import { DropDownItem } from 'src/Screens/components/DropDownMenu'; export const dialogProperties = { deleted: { messageId: 'main.chat.delete.confirmation', + primaryButtonMessage: 'main.chat.delete.confirmation.button', modalType: 'danger', }, ok: { messageId: 'main.chat.unban.confirmation', + primaryButtonMessage: 'main.chat.unban.confirmation.button', modalType: 'info', }, banned: { messageId: 'main.chat.ban.confirmation', + primaryButtonMessage: 'main.chat.ban.confirmation.button', modalType: 'warning', }, archived: { messageId: 'main.chat.archive.confirmation', + primaryButtonMessage: 'main.chat.archive.confirmation.button', modalType: 'info', }, } as const; @@ -26,8 +30,14 @@ type Item = Omit & { export const changeChatStatusOptions: Record = { banned: [ - { textId: 'main.chat.unban', nextStatus: 'ok' }, - { textId: 'main.chat.delete', nextStatus: 'deleted' }, + { + textId: 'main.chat.unban', + nextStatus: 'ok', + }, + { + textId: 'main.chat.delete', + nextStatus: 'deleted', + }, ], ok: [ { @@ -40,8 +50,14 @@ export const changeChatStatusOptions: Record = { }, ], archived: [ - { textId: 'main.chat.unban', nextStatus: 'ok' }, - { textId: 'main.chat.delete', nextStatus: 'deleted' }, + { + textId: 'main.chat.unban', + nextStatus: 'ok', + }, + { + textId: 'main.chat.delete', + nextStatus: 'deleted', + }, ], deleted: [], }; diff --git a/src/Screens/Main/Chat/index.tsx b/src/Screens/Main/Chat/index.tsx index 66118592..3eaf4534 100644 --- a/src/Screens/Main/Chat/index.tsx +++ b/src/Screens/Main/Chat/index.tsx @@ -169,7 +169,6 @@ const Chat = ({ navigation, route }: Props) => { {dialogState.dialogOpen && changeChatStatusAction && ( handleChangeChatStatus(changeChatStatusAction)} onSecondaryPress={() => setDialogs('dialogOpen', false)} diff --git a/src/Screens/Main/FolderedChats/index.tsx b/src/Screens/Main/FolderedChats/index.tsx index fec4679c..f4e9c868 100644 --- a/src/Screens/Main/FolderedChats/index.tsx +++ b/src/Screens/Main/FolderedChats/index.tsx @@ -100,7 +100,7 @@ export default ({ navigation, route }: Props) => { {dialogState.dialogOpen && ( {