From 96914f38699b0a614d52d793cd9dc6f1817ec67e Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 26 Apr 2018 14:33:43 -0300 Subject: [PATCH] Fabric and image fix (#284) * Fixed images not showing * Keyboard libs updated --- android/app/build.gradle | 4 ++-- android/app/proguard-rules.pro | 7 ++++++- app/containers/MessageBox/index.js | 27 ++++++++++++--------------- app/containers/message/index.js | 6 +++--- app/views/LoginSignupView.js | 6 +++--- app/views/LoginView.js | 14 +++++++++----- app/views/NewServerView.js | 5 +++-- app/views/RegisterView.js | 20 ++++++++++++-------- app/views/RoomsListView/index.js | 5 +++-- app/views/SelectedUsersView.js | 5 +++-- package-lock.json | 6 +++--- package.json | 1 - 12 files changed, 59 insertions(+), 47 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7efa4b2a..a00e48c8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -96,7 +96,7 @@ android { defaultConfig { applicationId "chat.rocket.reactnative" minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion 23 versionCode VERSIONCODE as Integer versionName "1" ndk { @@ -191,7 +191,7 @@ dependencies { compile "com.facebook.react:react-native:+" // From node_modules compile 'com.facebook.fresco:fresco:1.7.1' compile 'com.facebook.fresco:animated-gif:1.7.1' - compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { + compile('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') { transitive = true; } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 072b6d4c..8b924686 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -87,7 +87,12 @@ } # For Fabric to properly de-obfuscate your crash reports, you need to remove this line from your ProGuard config: - -printmapping mapping.txt +# -printmapping mapping.txt +-keepattributes SourceFile,LineNumberTable +-keep public class * extends java.lang.Exception +-keep class com.crashlytics.** { *; } +-dontwarn com.crashlytics.** + -dontwarn javax.annotation.** -dontwarn com.facebook.infer.** diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js index 24ec221a..4f62c84b 100644 --- a/app/containers/MessageBox/index.js +++ b/app/containers/MessageBox/index.js @@ -6,7 +6,6 @@ import ImagePicker from 'react-native-image-picker'; import { connect } from 'react-redux'; import { emojify } from 'react-emojione'; import { KeyboardAccessoryView } from 'react-native-keyboard-input'; -import { isIphoneX } from 'react-native-iphone-x-helper'; import { userTyping, layoutAnimation } from '../../actions/room'; import RocketChat from '../../lib/rocketchat'; @@ -504,20 +503,18 @@ export default class MessageBox extends React.PureComponent { render() { return ( - [ - this.renderContent()} - kbInputRef={this.component} - kbComponent={this.state.showEmojiKeyboard ? 'EmojiKeyboard' : null} - onKeyboardResigned={() => this.onKeyboardResigned()} - onItemSelected={this._onEmojiSelected} - trackInteractive - // revealKeyboardInteractive - requiresSameParentToManageScrollView - />, - isIphoneX() ? : null - ] + this.renderContent()} + kbInputRef={this.component} + kbComponent={this.state.showEmojiKeyboard ? 'EmojiKeyboard' : null} + onKeyboardResigned={() => this.onKeyboardResigned()} + onItemSelected={this._onEmojiSelected} + trackInteractive + // revealKeyboardInteractive + requiresSameParentToManageScrollView + addBottomView + /> ); } } diff --git a/app/containers/message/index.js b/app/containers/message/index.js index 399c6721..12c9f08e 100644 --- a/app/containers/message/index.js +++ b/app/containers/message/index.js @@ -226,13 +226,13 @@ export default class Message extends React.Component { const file = this.props.item.attachments[0]; const { user } = this.props; - if (file.image_type) { + if (file.image_url) { return ; } - if (file.audio_type) { + if (file.audio_url) { return