Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Bugs #211

Merged
merged 7 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebase-feed-mobile",
"version": "0.0.21",
"version": "0.0.22",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
1 change: 0 additions & 1 deletion packages/mobile/src/components/Chat/ChatDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ export const ChatDetail = memo(
type: [Document.types.pdf, Document.types.doc, Document.types.docx], // Don't add support for all files. Keeping it pdf and docs for now
mode: 'open',
});
console.log(document);
document.fileCopyUri = fixDocumentURI(document.fileCopyUri || document.uri);
const asset: Asset = {
uri: document.fileCopyUri,
Expand Down
1 change: 1 addition & 0 deletions packages/mobile/src/components/Chat/MediaMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const InnerMediaMessage = memo(
style={{
borderRadius: 10,
backgroundColor: isDarkMode ? Colors.black : Colors.white,
maxWidth: width * 0.8,
}}
/>
);
Expand Down
5 changes: 4 additions & 1 deletion packages/mobile/src/components/ui/Media/MediaGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export const MediaGallery = memo(
: 0,
}}
onLongPress={onLongPress}
onClick={() => onClick?.(index)}
onClick={() => {
return onClick?.(index);
}}
/>
);
})}
Expand All @@ -150,6 +152,7 @@ export const MediaGallery = memo(
top: 0,
left: 0,
display: 'flex',
pointerEvents: 'none',
}}
>
<Pressable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const VideoWithLoader = memo(
/>
) : canDownload ? (
<LocalVideo
odinId={odinId}
fileId={fileId}
targetDrive={targetDrive}
globalTransitId={globalTransitId}
Expand Down Expand Up @@ -251,7 +252,6 @@ const LocalVideo = ({
videoGlobalTransitId: globalTransitId,
probablyEncrypted,
payloadKey: payload.key,

lastModified,
}).fetch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ const useImage = (props?: {
lastModified,
{
size,
systemFileType,
}
);
if (!imageBlob) return null;
Expand Down Expand Up @@ -189,6 +190,7 @@ const useImage = (props?: {
lastModified,
{
size,
systemFileType,
}
);
if (!imageBlob) return null;
Expand Down
3 changes: 2 additions & 1 deletion packages/mobile/src/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getNewId } from '@homebase-id/js-lib/helpers';
import { InfiniteData } from '@tanstack/react-query';
import { Image, Linking } from 'react-native';
import { CachesDirectoryPath, copyFile } from 'react-native-fs';
Expand Down Expand Up @@ -95,7 +96,7 @@ export function fixDocumentURI(url: string): string {

export async function fixContentURI(url: string, format?: string): Promise<string> {
if (url.startsWith('content://') && format) {
const destPath = `${CachesDirectoryPath}/${format}`;
const destPath = `${CachesDirectoryPath}/${getNewId()}.${format}`;
await copyFile(url, destPath);
return `file://${destPath}`;
}
Expand Down
Loading