diff --git a/app/mobile/ios/Databag.xcodeproj/project.pbxproj b/app/mobile/ios/Databag.xcodeproj/project.pbxproj index 56bd29ee..a6f36c94 100644 --- a/app/mobile/ios/Databag.xcodeproj/project.pbxproj +++ b/app/mobile/ios/Databag.xcodeproj/project.pbxproj @@ -571,7 +571,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -643,7 +643,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/app/mobile/ios/Podfile.lock b/app/mobile/ios/Podfile.lock index b247937e..09dcb1db 100644 --- a/app/mobile/ios/Podfile.lock +++ b/app/mobile/ios/Podfile.lock @@ -322,6 +322,8 @@ PODS: - glog - react-native-document-picker (8.1.3): - React-Core + - react-native-keep-awake (1.1.0): + - React-Core - react-native-rsa-native (2.0.5): - React - react-native-safe-area-context (4.5.0): @@ -503,6 +505,7 @@ DEPENDENCIES: - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - react-native-document-picker (from `../node_modules/react-native-document-picker`) + - "react-native-keep-awake (from `../node_modules/@sayem314/react-native-keep-awake`)" - react-native-rsa-native (from `../node_modules/react-native-rsa-native`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - react-native-sqlite-storage (from `../node_modules/react-native-sqlite-storage`) @@ -590,6 +593,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/logger" react-native-document-picker: :path: "../node_modules/react-native-document-picker" + react-native-keep-awake: + :path: "../node_modules/@sayem314/react-native-keep-awake" react-native-rsa-native: :path: "../node_modules/react-native-rsa-native" react-native-safe-area-context: @@ -679,6 +684,7 @@ SPEC CHECKSUMS: React-jsinspector: 9f7c9137605e72ca0343db4cea88006cb94856dd React-logger: 957e5dc96d9dbffc6e0f15e0ee4d2b42829ff207 react-native-document-picker: 958e2bc82e128be69055be261aeac8d872c8d34c + react-native-keep-awake: acbee258db16483744910f0da3ace39eb9ab47fd react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc react-native-sqlite-storage: f6d515e1c446d1e6d026aa5352908a25d4de3261 diff --git a/app/mobile/package.json b/app/mobile/package.json index 7f382f40..1c8b94c0 100644 --- a/app/mobile/package.json +++ b/app/mobile/package.json @@ -18,6 +18,7 @@ "@react-navigation/native": "^6.1.4", "@react-navigation/native-stack": "^6.9.10", "@react-navigation/stack": "^6.3.14", + "@sayem314/react-native-keep-awake": "^1.1.0", "axios": "^1.3.3", "crypto-js": "^3.3.0", "jsencrypt": "^3.3.1", diff --git a/app/mobile/src/session/conversation/topicItem/audioAsset/AudioAsset.jsx b/app/mobile/src/session/conversation/topicItem/audioAsset/AudioAsset.jsx index 4de7a4c0..143188ab 100644 --- a/app/mobile/src/session/conversation/topicItem/audioAsset/AudioAsset.jsx +++ b/app/mobile/src/session/conversation/topicItem/audioAsset/AudioAsset.jsx @@ -6,6 +6,7 @@ import { useAudioAsset } from './useAudioAsset.hook'; import { styles } from './AudioAsset.styled'; import Icons from 'react-native-vector-icons/MaterialCommunityIcons'; import audio from 'images/audio.png'; +import { useKeepAwake } from '@sayem314/react-native-keep-awake'; export function AudioAsset({ topicId, asset, dismiss }) { @@ -13,6 +14,8 @@ export function AudioAsset({ topicId, asset, dismiss }) { const player = useRef(null); + useKeepAwake(); + return ( diff --git a/app/mobile/src/session/conversation/topicItem/videoAsset/VideoAsset.jsx b/app/mobile/src/session/conversation/topicItem/videoAsset/VideoAsset.jsx index ef3ed9a4..2ce1c13c 100644 --- a/app/mobile/src/session/conversation/topicItem/videoAsset/VideoAsset.jsx +++ b/app/mobile/src/session/conversation/topicItem/videoAsset/VideoAsset.jsx @@ -4,11 +4,14 @@ import Video from 'react-native-video'; import { useVideoAsset } from './useVideoAsset.hook'; import { styles } from './VideoAsset.styled'; import Icons from 'react-native-vector-icons/MaterialCommunityIcons'; +import { useKeepAwake } from '@sayem314/react-native-keep-awake'; export function VideoAsset({ topicId, asset, dismiss }) { const { state, actions } = useVideoAsset(topicId, asset); + useKeepAwake(); + return ( diff --git a/app/mobile/yarn.lock b/app/mobile/yarn.lock index b9ed4e91..0a93e42c 100644 --- a/app/mobile/yarn.lock +++ b/app/mobile/yarn.lock @@ -1785,6 +1785,11 @@ resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.3.2.tgz" integrity sha512-t54ONhl/h75X94SWsHGQ4G/ZrCEguKSRQr7DrjTciJXW0YU1QhlwYeycvK5JgkzlxmvrK7wq1NB/PLtHxoiDcA== +"@sayem314/react-native-keep-awake@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@sayem314/react-native-keep-awake/-/react-native-keep-awake-1.1.0.tgz#852f9f8481c0ab38a54d6f0b85324f3024eb6031" + integrity sha512-1k57PXJIfhZrjA4ZQr+goTEYer8MBhe1At6XjVYJq1oBuhG/CIu0gX1EH9fU9exC65e5uDs/zAwjl6Ps+3lCgg== + "@sideway/address@^4.1.3": version "4.1.4" resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz"