diff --git a/app/client/mobile/android/app/src/main/AndroidManifest.xml b/app/client/mobile/android/app/src/main/AndroidManifest.xml index e1892528..01efb975 100644 --- a/app/client/mobile/android/app/src/main/AndroidManifest.xml +++ b/app/client/mobile/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,22 @@ + + + + + + + + + + + + + + + + + android:supportsRtl="true" + android:requestLegacyExternalStorage="true"> actions.setPassword(value)} /> - + { (!state.username || !state.password || !state.node) && ( + + )} + { state.username && state.password && state.node && ( + + )} diff --git a/app/client/mobile/src/access/useAccess.hook.ts b/app/client/mobile/src/access/useAccess.hook.ts index 84248a09..40de4c3b 100644 --- a/app/client/mobile/src/access/useAccess.hook.ts +++ b/app/client/mobile/src/access/useAccess.hook.ts @@ -10,7 +10,7 @@ export function useAccess() { const display = useContext(DisplayContext) as ContextType; const [state, setState] = useState({ layout: null, - strings: display.state.strings, + strings: {}, mode: 'account', username: '', handle: '', @@ -74,8 +74,8 @@ export function useAccess() { }; useEffect(() => { - const {layout} = display.state; - updateState({layout}); + const {layout, strings} = display.state; + updateState({layout, strings}); }, [display.state]); const actions = { diff --git a/app/client/mobile/src/conversation/Conversation.tsx b/app/client/mobile/src/conversation/Conversation.tsx index 2e7b5ff1..792b6f16 100644 --- a/app/client/mobile/src/conversation/Conversation.tsx +++ b/app/client/mobile/src/conversation/Conversation.tsx @@ -128,7 +128,7 @@ export function Conversation({close}: {close: ()=>void}) { const addImage = async () => { try { const { path, mime, size } = await ImagePicker.openPicker({ mediaType: 'photo' }); - actions.addImage(`file://${path}`, mime, size); + actions.addImage(path, mime, size); } catch (err) { console.log(err); diff --git a/app/client/mobile/src/conversation/useConversation.hook.ts b/app/client/mobile/src/conversation/useConversation.hook.ts index 53e1e1f6..3ebd276d 100644 --- a/app/client/mobile/src/conversation/useConversation.hook.ts +++ b/app/client/mobile/src/conversation/useConversation.hook.ts @@ -14,7 +14,6 @@ const WEBP_TYPE = 'image/webp'; const LOAD_DEBOUNCE = 1000; async function getImageThumb(path: string, type: string, size: number) { -console.log("GET THUMB: ", path, type, size); if (size < IMAGE_SCALE_SIZE) { const base = await RNFS.readFile(path, 'base64') return `data:image/jpeg;base64,${base}`; @@ -26,8 +25,9 @@ console.log("GET THUMB: ", path, type, size); } async function getVideoThumb(path: string, position?: number) { +console.log("GET FULL VID THUMB: ", path); const timeStamp = position ? position * 1000 : 0; - const shot = await createThumbnail({ url: path.slice(7), timeStamp }) + const shot = await createThumbnail({ url: path, timeStamp }) const thumb = await ImageResizer.createResizedImage('file://' + shot.path, 192, 192, "JPEG", 50, 0, null); const base = await RNFS.readFile(thumb.path, 'base64') return `data:image/jpeg;base64,${base}`;