diff --git a/IRCCloud.xcodeproj/project.pbxproj b/IRCCloud.xcodeproj/project.pbxproj index bdce0856..70385ae2 100644 --- a/IRCCloud.xcodeproj/project.pbxproj +++ b/IRCCloud.xcodeproj/project.pbxproj @@ -3516,6 +3516,7 @@ "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebasePerformance/FirebasePerformance.framework", "${BUILT_PRODUCTS_DIR}/FirebaseRemoteConfig/FirebaseRemoteConfig.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseSharedSwift/FirebaseSharedSwift.framework", "${BUILT_PRODUCTS_DIR}/youtube-ios-player-helper/youtube_ios_player_helper.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -3533,6 +3534,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebasePerformance.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseRemoteConfig.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseSharedSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/youtube_ios_player_helper.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -3582,6 +3584,7 @@ "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebasePerformance/FirebasePerformance.framework", "${BUILT_PRODUCTS_DIR}/FirebaseRemoteConfig/FirebaseRemoteConfig.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseSharedSwift/FirebaseSharedSwift.framework", "${BUILT_PRODUCTS_DIR}/youtube-ios-player-helper/youtube_ios_player_helper.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -3599,6 +3602,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebasePerformance.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseRemoteConfig.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseSharedSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/youtube_ios_player_helper.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -3648,6 +3652,7 @@ "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebasePerformance/FirebasePerformance.framework", "${BUILT_PRODUCTS_DIR}/FirebaseRemoteConfig/FirebaseRemoteConfig.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseSharedSwift/FirebaseSharedSwift.framework", "${BUILT_PRODUCTS_DIR}/youtube-ios-player-helper/youtube_ios_player_helper.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -3665,6 +3670,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebasePerformance.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseRemoteConfig.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseSharedSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/youtube_ios_player_helper.framework", ); runOnlyForDeploymentPostprocessing = 0; diff --git a/IRCCloud/Classes/MainViewController.m b/IRCCloud/Classes/MainViewController.m index 0fce7d2b..243fcc4d 100644 --- a/IRCCloud/Classes/MainViewController.m +++ b/IRCCloud/Classes/MainViewController.m @@ -5472,15 +5472,13 @@ -(void)closeColorPicker { } -(void)paste:(id)sender { - if([UIPasteboard generalPasteboard].hasImages && ![UIPasteboard generalPasteboard].hasURLs) { - for(NSString *type in [UIPasteboard generalPasteboard].pasteboardTypes) { - if([type isEqualToString:(__bridge NSString *)kUTTypeGIF] && [UIPasteboard generalPasteboard].image) { - UIImage *img = [UIPasteboard generalPasteboard].image; - NSData *gifData = [[UIPasteboard generalPasteboard] dataForPasteboardType:(__bridge NSString *)kUTTypeGIF]; - if(img != nil && gifData != nil) - [self _imagePickerController:[UIImagePickerController new] didFinishPickingMediaWithInfo:@{UIImagePickerControllerOriginalImage:img, @"gifData":gifData}]; - return; - } + if([UIPasteboard generalPasteboard].hasImages && [UIPasteboard generalPasteboard].image && ![UIPasteboard generalPasteboard].hasURLs) { + if([UIPasteboard generalPasteboard].image && [[UIPasteboard generalPasteboard] containsPasteboardTypes:@[(__bridge NSString *)kUTTypeGIF]]) { + UIImage *img = [UIPasteboard generalPasteboard].image; + NSData *gifData = [[UIPasteboard generalPasteboard] dataForPasteboardType:(__bridge NSString *)kUTTypeGIF]; + if(img != nil && gifData != nil) + [self _imagePickerController:[UIImagePickerController new] didFinishPickingMediaWithInfo:@{UIImagePickerControllerOriginalImage:img, @"gifData":gifData}]; + return; } [self _imagePickerController:[UIImagePickerController new] didFinishPickingMediaWithInfo:@{UIImagePickerControllerOriginalImage:[UIPasteboard generalPasteboard].image}]; } else if([UIPasteboard generalPasteboard].hasStrings) {