Skip to content

Commit

Permalink
Fix(2526): Fix images on ios and clean up some logging (#2536)
Browse files Browse the repository at this point in the history
* Fix images on ios and clean up some logging

* Update changelogs
  • Loading branch information
ikoenigsknecht committed May 20, 2024
1 parent d20f2b6 commit 05dd416
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* Fix package.json license inconsistency
* Fixes issue with reconnecting to peers on resume on iOS ([#2424](https://github.com/TryQuiet/quiet/issues/2424))
* Reorder the closing of services, prevent sagas running multiple times and close backend server properly
* Fixes issue with image messages not displaying/throwing errors on iOS ([#2526](https://github.com/TryQuiet/quiet/issues/2526))

[2.1.2]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
if (this.communityId) {
this.serverIoProvider.io.emit(SocketActionTypes.COMMUNITY_LAUNCHED, { id: this.communityId })
this.logger('this.libp2pService.connectedPeers', this.libp2pService.connectedPeers)
this.logger('this.libp2pservice', this.libp2pService)
this.logger('this.libp2pService.dialedPeers', this.libp2pService.dialedPeers)
this.serverIoProvider.io.emit(
SocketActionTypes.CONNECTED_PEERS,
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/nest/socket/socket.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class SocketService extends EventEmitter implements OnModuleInit {
socket.on(
SocketActionTypes.CREATE_COMMUNITY,
async (payload: InitCommunityPayload, callback: (response: Community | undefined) => void) => {
this.logger(`Creating community ${payload.id}`)
this.logger(`Creating community`, payload.id)
this.emit(SocketActionTypes.CREATE_COMMUNITY, payload, callback)
}
)
Expand Down
1 change: 1 addition & 0 deletions packages/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

* Update github workflows for PR gating ([#2487](https://github.com/TryQuiet/quiet/issues/2487))
* Don't create duplicate CSRs when joining a community under certain circumstances ([#2321](https://github.com/TryQuiet/quiet/issues/2321))
* Fixes issue with image messages not displaying/throwing errors on iOS ([#2526](https://github.com/TryQuiet/quiet/issues/2526))

[2.2.0]

Expand Down
18 changes: 15 additions & 3 deletions packages/mobile/ios/Quiet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
<key>ITSAppUsesNonExemptEncryption</key>
<false />
<key>LSRequiresIPhoneOS</key>
<true />
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand All @@ -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></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>
Expand All @@ -74,7 +84,9 @@
<string>Rubik-SemiBoldItalic.ttf</string>
</array>
<key>UIBackgroundModes</key>
<array />
<array/>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}>
{!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>
<FastImage source={{ uri: `file://${path}` }} style={{ maxWidth, aspectRatio }} />
</View>
</TouchableWithoutFeedback>
)}
</View>
Expand Down

0 comments on commit 05dd416

Please sign in to comment.