Compare commits

...

10 Commits

Author SHA1 Message Date
Elias Nahum
a9508d30f9 Bump Android build number to 114 (#1809) 2018-06-22 17:53:29 -04:00
Elias Nahum
e2c2dcd3ac Bump iOS build number to 114 (#1808) 2018-06-22 17:52:58 -04:00
Sudheer
d07d85ef9d MM-11006 Fix android seach field population for in and from keywords (#1806) 2018-06-22 17:18:53 -04:00
Elias Nahum
8aa4c1467d Fixes entry point and keyboard lag (#1804)
* Fix entry when upgrading/installing and not logged

* Fix textInput lag by using rn fork

* Update RNFetchBlob
2018-06-22 16:19:51 -04:00
Elias Nahum
c10d31c62b Bump Android build number to 113 (#1801) 2018-06-21 18:48:17 -04:00
Elias Nahum
54857865ec Bump iOS build number to 113 (#1800) 2018-06-21 18:43:29 -04:00
Elias Nahum
4796c3034e Increment app version to 1.9.1 2018-06-21 18:25:27 -04:00
Elias Nahum
3055a43ec8 Fix user being "logged out" after upgrading (#1798) 2018-06-21 18:17:59 -04:00
Harrison Healey
e19b6a08d3 Silence fetch errors caused by websocket action (#1797) 2018-06-21 18:17:29 -04:00
Harrison Healey
92b992d204 MM-10822 Change post textbox to only be partially connected 2018-06-21 18:13:02 -04:00
13 changed files with 1235 additions and 903 deletions

View File

@@ -113,8 +113,8 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion 21
targetSdkVersion 23
versionCode 112
versionName "1.9.0"
versionCode 114
versionName "1.9.1"
ndk {
abiFilters "armeabi-v7a", "x86"
}

View File

@@ -76,6 +76,7 @@ export default class App {
return Initialization.credentials;
},
() => {
this.waitForRehydration = true;
return getGenericPassword();
}
);
@@ -153,6 +154,13 @@ export default class App {
}
const username = `${deviceToken}, ${currentUserId}`;
const password = `${token},${url}`;
if (this.waitForRehydration) {
this.waitForRehydration = false;
this.token = token;
this.url = url;
}
setGenericPassword(username, password);
};
@@ -215,7 +223,7 @@ export default class App {
};
startApp = () => {
if (this.appStarted) {
if (this.appStarted || this.waitForRehydration) {
return;
}

View File

@@ -3,7 +3,7 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {Alert, BackHandler, Keyboard, Platform, Text, TextInput, TouchableOpacity, View} from 'react-native';
import {Alert, BackHandler, Keyboard, Platform, Text, TouchableOpacity, View} from 'react-native';
import {intlShape} from 'react-intl';
import {RequestStatus} from 'mattermost-redux/constants';
import EventEmitter from 'mattermost-redux/utils/event_emitter';
@@ -11,6 +11,7 @@ import EventEmitter from 'mattermost-redux/utils/event_emitter';
import AttachmentButton from 'app/components/attachment_button';
import Autocomplete from 'app/components/autocomplete';
import FileUploadPreview from 'app/components/file_upload_preview';
import QuickTextInput from 'app/components/quick_text_input';
import {INITIAL_HEIGHT, INSERT_TO_COMMENT, INSERT_TO_DRAFT, IS_REACTION_REGEX, MAX_CONTENT_HEIGHT, MAX_FILE_COUNT} from 'app/constants/post_textbox';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
@@ -494,7 +495,7 @@ export default class PostTextbox extends PureComponent {
<View style={style.inputWrapper}>
{!channelIsReadOnly && attachmentButton}
<View style={[inputContainerStyle, (channelIsReadOnly && {marginLeft: 10})]}>
<TextInput
<QuickTextInput
ref='input'
value={textValue}
onChangeText={this.handleTextChange}

View File

@@ -0,0 +1,86 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import PropTypes from 'prop-types';
import React from 'react';
import {TextInput} from 'react-native';
// A component that can be used to make partially-controlled inputs that can be updated
// by changing the value prop without lagging the UI
export default class QuickTextInput extends React.PureComponent {
static propTypes = {
/**
* Whether to delay updating the value of the textbox from props. Should only be used
* on textboxes that require it to properly compose CJK characters as the user types.
*/
delayInputUpdate: PropTypes.bool,
/**
* The string value displayed in this input
*/
value: PropTypes.string.isRequired,
};
static defaultProps = {
delayInputUpdate: false,
value: '',
};
componentDidUpdate(prevProps) {
if (prevProps.value !== this.props.value) {
if (this.props.delayInputUpdate) {
requestAnimationFrame(this.updateInputFromProps);
} else {
this.updateInputFromProps();
}
}
}
updateInputFromProps = () => {
if (!this.input) {
return;
}
this.input.setNativeProps({text: this.props.value});
}
get value() {
return this.input.value;
}
set value(value) {
this.input.setNativeProps({text: this.props.value});
}
focus() {
this.input.focus();
}
blur() {
this.input.blur();
}
getInput = () => {
return this.input;
};
setInput = (input) => {
this.input = input;
}
render() {
const {value, ...props} = this.props;
Reflect.deleteProperty(props, 'delayInputUpdate');
// Only set the defaultValue since the real one will be updated using componentDidUpdate if necessary
return (
<TextInput
{...props}
ref={this.setInput}
defaultValue={value}
/>
);
}
}

View File

@@ -71,6 +71,16 @@ export default class SearchBarAndroid extends PureComponent {
};
}
static getDerivedStateFromProps(nextProps, prevState) {
if (nextProps.value !== prevState.value) {
return {
value: nextProps.value,
};
}
return null;
}
cancel = () => {
this.onCancelButtonPress();
};

View File

@@ -18,11 +18,15 @@ Client4.doFetchWithResponse = async (url, options) => {
url,
};
}
const response = await fetch(url, Client4.getOptions(options));
const headers = response.headers;
let response;
let headers;
let data;
try {
response = await fetch(url, Client4.getOptions(options));
headers = response.headers;
data = await response.json();
} catch (err) {
if (response && response.resp && response.resp.data && response.resp.data.includes('SSL certificate')) {

View File

@@ -153,6 +153,8 @@ export default class Entry extends PureComponent {
if (credentials.token && credentials.url) {
Client4.setToken(credentials.token);
Client4.setUrl(stripTrailingSlashes(credentials.url));
} else if (app.waitForRehydration) {
app.waitForRehydration = false;
}
if (currentUserId) {

View File

@@ -2516,7 +2516,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 114;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -2566,7 +2566,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 112;
CURRENT_PROJECT_VERSION = 114;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View File

@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.9.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>112</string>
<string>114</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@@ -21,9 +21,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.9.1</string>
<key>CFBundleVersion</key>
<string>112</string>
<string>114</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View File

@@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.0</string>
<string>1.9.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>112</string>
<string>114</string>
</dict>
</plist>

1991
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,12 +15,12 @@
"intl": "1.2.5",
"jail-monkey": "1.0.0",
"jsc-android": "216113.0.3",
"mattermost-redux": "github:mattermost/mattermost-redux#c9b633da7fc3fc9ba3cc40ecc9665e088defbe73",
"mattermost-redux": "github:mattermost/mattermost-redux#d2e9ba4f30a7bdfccda9aab1cfa8124c4ca1f275",
"mime-db": "1.33.0",
"prop-types": "15.6.1",
"react": "16.3.2",
"react-intl": "2.4.0",
"react-native": "0.55.3",
"react-native": "github:enahum/react-native#text-0.55",
"react-native-animatable": "1.2.4",
"react-native-bottom-sheet": "1.0.3",
"react-native-button": "2.3.0",
@@ -32,7 +32,7 @@
"react-native-drawer": "2.5.0",
"react-native-exception-handler": "2.7.5",
"react-native-fast-image": "4.0.8",
"react-native-fetch-blob": "enahum/react-native-fetch-blob.git#c4c798032d9c255fbae75d13a0a985af9b8b42ca",
"react-native-fetch-blob": "enahum/react-native-fetch-blob.git#27983c83d7fad1cb4821dd6ba8e405da4af64f3a",
"react-native-image-gallery": "enahum/react-native-image-gallery#a98b1051e94f5a394541ca1ff9b15e2c9ffed84f",
"react-native-image-picker": "0.26.7",
"react-native-keyboard-aware-scroll-view": "0.5.0",