-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix(2526): Fix images on ios and clean up some logging #2536
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ export class SocketService extends EventEmitter implements OnModuleInit { | |
socket.on( | ||
SocketActionTypes.CREATE_COMMUNITY, | ||
async (payload: InitCommunityPayload, callback: (response: Community | undefined) => void) => { | ||
this.logger.info(`Creating community ${payload.id}`) | ||
this.logger.info(`Creating community`, payload.id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another formatting thing |
||
this.emit(SocketActionTypes.CREATE_COMMUNITY, payload, callback) | ||
} | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,8 @@ | |
<false/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of the items added here, even the ones that don't seem relevant (e.g. |
||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>LSSupportsOpeningDocumentsInPlace</key> | ||
<true/> | ||
<key>NSAppTransportSecurity</key> | ||
<dict> | ||
<key>NSAllowsArbitraryLoads</key> | ||
|
@@ -54,8 +56,16 @@ | |
</dict> | ||
</dict> | ||
</dict> | ||
<key>NSAppleMusicUsageDescription</key> | ||
<string>Quiet uses the document directory for storing files and images sent through the app.</string> | ||
<key>NSDocumentsFolderUsageDescription</key> | ||
<string>Quiet uses the document directory for storing files and images sent through the app.</string> | ||
<key>NSLocationWhenInUseUsageDescription</key> | ||
<string></string> | ||
<key>NSPhotoLibraryLimitedAccessAPISupport</key> | ||
<true/> | ||
<key>NSPhotoLibraryUsageDescription</key> | ||
<string>Quiet access photos for sending images through the app.</string> | ||
<key>UIAppFonts</key> | ||
<array> | ||
<string>Rubik-Black.ttf</string> | ||
|
@@ -75,6 +85,8 @@ | |
</array> | ||
<key>UIBackgroundModes</key> | ||
<array/> | ||
<key>UIFileSharingEnabled</key> | ||
<true/> | ||
<key>UILaunchStoryboardName</key> | ||
<string>LaunchScreen</string> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,18 @@ import FastImage from 'react-native-fast-image' | |
export const UploadedImage: FC<UploadedImageProps> = ({ media, openImagePreview }) => { | ||
const { path, width, height } = media | ||
|
||
const aspectRatio = width && height ? width / height : undefined | ||
const maxWidth = width && width >= 400 ? 400 : width | ||
|
||
return ( | ||
<View> | ||
<View style={{ padding: 5 }}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was just to clean up the appearance of images a little bit. |
||
{!path || !width || !height ? ( | ||
<ActivityIndicator size='small' color={defaultTheme.palette.main.brand} /> | ||
) : ( | ||
<TouchableWithoutFeedback onPress={() => openImagePreview(media)}> | ||
<FastImage source={{ uri: `file://${path}` }} style={{ maxWidth, aspectRatio: width / height }} /> | ||
<View> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the fix for displaying images. Turns out |
||
<FastImage source={{ uri: `file://${path}` }} style={{ maxWidth, aspectRatio }} /> | ||
</View> | ||
</TouchableWithoutFeedback> | ||
)} | ||
</View> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ export function subscribe(socket: Socket) { | |
}) | ||
// Misc | ||
socket.on(SocketActionTypes.PEER_CONNECTED, (payload: { peers: string[] }) => { | ||
logger.info(`${SocketActionTypes.PEER_CONNECTED}: ${payload}`) | ||
logger.info(`${SocketActionTypes.PEER_CONNECTED}`, payload) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just a formatting issue. |
||
emit(networkActions.addConnectedPeers(payload.peers)) | ||
}) | ||
socket.on(SocketActionTypes.PEER_DISCONNECTED, (payload: NetworkDataPayload) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was throwing a circular reference error since under the hood the logger is now doing a
JSON.stringify
on objects.