Compare commits

...

13 Commits

Author SHA1 Message Date
Miguel Alatzar
b16c87988e Bump app build number to 215 (#3066) 2019-08-01 12:29:25 -04:00
Mattermost Build
361528de86 Check initialIndex in callback (#3065) 2019-08-01 08:40:44 -07:00
Elias Nahum
f71d9568ce Bump app build number to 214 (#3063) 2019-07-31 19:39:38 -04:00
Miguel Alatzar
f117281bec Call scrollToIndex only if flatListRef.current is not null (#3022) 2019-07-31 19:33:40 -04:00
Elias Nahum
995704df00 Bump app build number to 213 (#3058) 2019-07-31 09:34:22 -04:00
Miguel Alatzar
cb912bb175 Dispatch setDeviceToken after hydration (#3056) 2019-07-31 09:26:39 -04:00
Elias Nahum
a99d6f8b82 Bump app version number to 1.21.2 (#3043) 2019-07-25 08:53:58 -04:00
Elias Nahum
d68962d230 Bump app build number to 212 (#3042) 2019-07-25 08:49:03 -04:00
Elias Nahum
339ff1ae8f Fix assigning credentials during app init (#3034)
* Fix assigning credentials during app init

* remove setAppCredentials in entry screen
2019-07-25 08:12:32 -04:00
Elias Nahum
ffa4a2253e Bump app build number to 210 (#3000) 2019-07-19 16:53:24 -04:00
Elias Nahum
fbdec3d42b MM-16829 Fix for websocket reconnects for android 2019-07-19 16:47:21 -04:00
Elias Nahum
c996c05eca Bump Version to 1.21.1 and build number to 209 (#2995)
* Bump app build number to 209

* Bump app version number to 1.21.1
2019-07-18 18:43:26 -04:00
Mattermost Build
f8808b0eaf MM-16829 Fix for sso with server subpaths (#2991) 2019-07-19 00:04:48 +05:30
12 changed files with 50 additions and 65 deletions

View File

@@ -87,7 +87,7 @@ if (System.getenv("SENTRY_ENABLED") == "true") {
flavorAware: false
]
//apply from: "../../node_modules/react-native-sentry/sentry.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
}
/**
@@ -122,8 +122,9 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 208
versionName "1.21.0"
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative57_5"
versionCode 215
versionName "1.21.2"
multiDexEnabled = true
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

View File

@@ -6,6 +6,7 @@ import {Linking, NativeModules, Platform, Text} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import {setGenericPassword, getGenericPassword, resetGenericPassword} from 'react-native-keychain';
import {setDeviceToken} from 'mattermost-redux/actions/general';
import {loadMe} from 'mattermost-redux/actions/users';
import {Client4} from 'mattermost-redux/client';
import EventEmitter from 'mattermost-redux/utils/event_emitter';
@@ -127,10 +128,12 @@ export default class App {
// if for any case the url and the token aren't valid proceed with re-hydration
if (url && url !== 'undefined' && token && token !== 'undefined') {
this.deviceToken = deviceToken;
const {dispatch} = store;
this.currentUserId = currentUserId;
this.token = token;
this.url = url;
dispatch(setDeviceToken(deviceToken));
Client4.setUrl(url);
Client4.setToken(token);
await setCSRFFromCookie(url);

View File

@@ -201,10 +201,8 @@ export default class PostList extends PureComponent {
};
handleScrollToIndexFailed = () => {
requestAnimationFrame(() => {
this.hasDoneInitialScroll = false;
this.scrollToInitialIndexIfNeeded(1, 1);
});
this.hasDoneInitialScroll = false;
this.scrollToInitialIndexIfNeeded(1, 1);
};
handleSetScrollToBottom = () => {
@@ -291,17 +289,17 @@ export default class PostList extends PureComponent {
if (
width > 0 &&
height > 0 &&
this.props.initialIndex > 0 &&
!this.hasDoneInitialScroll &&
this.flatListRef?.current
!this.hasDoneInitialScroll
) {
requestAnimationFrame(() => {
this.flatListRef.current.scrollToIndex({
animated: false,
index: this.props.initialIndex,
viewOffset: 0,
viewPosition: 1, // 0 is at bottom
});
if (this.props.initialIndex > 0 && this.flatListRef?.current) {
this.flatListRef.current.scrollToIndex({
animated: false,
index: this.props.initialIndex,
viewOffset: 0,
viewPosition: 1, // 0 is at bottom
});
}
});
this.hasDoneInitialScroll = true;
}

View File

@@ -21,7 +21,6 @@ import {
} from 'app/mattermost';
import {ViewTypes} from 'app/constants';
import PushNotifications from 'app/push_notifications';
import {stripTrailingSlashes} from 'app/utils/url';
import {wrapWithContextProvider} from 'app/utils/wrap_context_provider';
import ChannelLoader from 'app/components/channel_loader';
@@ -110,6 +109,7 @@ export default class Entry extends PureComponent {
const {
actions: {
autoUpdateTimezone,
setDeviceToken,
},
enableTimezone,
deviceTimezone,
@@ -128,7 +128,20 @@ export default class Entry extends PureComponent {
autoUpdateTimezone(deviceTimezone);
}
this.setAppCredentials();
const {currentUserId} = state.entities.users;
if (app.waitForRehydration) {
app.waitForRehydration = false;
}
if (currentUserId) {
Client4.setUserId(currentUserId);
}
if (app.deviceToken) {
setDeviceToken(app.deviceToken);
}
this.setStartupThemes();
this.handleNotification();
this.loadSystemEmojis();
@@ -147,36 +160,6 @@ export default class Entry extends PureComponent {
configureNotifications();
};
setAppCredentials = () => {
const {
actions: {
setDeviceToken,
},
} = this.props;
const {getState} = store;
const state = getState();
const {credentials} = state.entities.general;
const {currentUserId} = state.entities.users;
if (app.deviceToken) {
setDeviceToken(app.deviceToken);
}
if (credentials.token && credentials.url) {
Client4.setToken(credentials.token);
Client4.setUrl(stripTrailingSlashes(credentials.url));
} else if (app.waitForRehydration) {
app.waitForRehydration = false;
}
if (currentUserId) {
Client4.setUserId(currentUserId);
}
app.setAppCredentials(app.deviceToken, currentUserId, credentials.token, credentials.url);
};
setStartupThemes = () => {
const {theme} = this.props;
if (app.toolbarBackground === theme.sidebarHeaderBg) {

View File

@@ -175,7 +175,7 @@ class SSO extends PureComponent {
onLoadEnd = (event) => {
const url = event.nativeEvent.url;
if (url.includes(this.completedUrl)) {
CookieManager.get(urlParse(url).origin, this.useWebkit).then((res) => {
CookieManager.get(this.props.serverUrl, this.useWebkit).then((res) => {
const token = res.MMAUTHTOKEN;
if (token) {

View File

@@ -2768,7 +2768,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 208;
CURRENT_PROJECT_VERSION = 215;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -2828,7 +2828,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 208;
CURRENT_PROJECT_VERSION = 215;
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.21.0</string>
<string>1.21.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>208</string>
<string>215</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.21.0</string>
<string>1.21.2</string>
<key>CFBundleVersion</key>
<string>208</string>
<string>215</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.21.0</string>
<string>1.21.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>208</string>
<string>215</string>
</dict>
</plist>

View File

@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.21.0</string>
<string>1.21.2</string>
<key>CFBundleVersion</key>
<string>208</string>
<string>215</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>

4
package-lock.json generated
View File

@@ -13155,8 +13155,8 @@
"integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A=="
},
"mattermost-redux": {
"version": "github:mattermost/mattermost-redux#7f38003e06057d8099949f757d6fbbb6170925e7",
"from": "github:mattermost/mattermost-redux#7f38003e06057d8099949f757d6fbbb6170925e7",
"version": "github:mattermost/mattermost-redux#da357eba978b5d27f8cb4c3034e01dff959c0660",
"from": "github:mattermost/mattermost-redux#da357eba978b5d27f8cb4c3034e01dff959c0660",
"requires": {
"deep-equal": "1.0.1",
"eslint-plugin-header": "3.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "mattermost-mobile",
"version": "1.21.0",
"version": "1.21.2",
"description": "Mattermost Mobile with React Native",
"repository": "git@github.com:mattermost/mattermost-mobile.git",
"author": "Mattermost, Inc.",
@@ -19,7 +19,7 @@
"intl": "1.2.5",
"jail-monkey": "2.2.0",
"jsc-android": "241213.2.0",
"mattermost-redux": "github:mattermost/mattermost-redux#7f38003e06057d8099949f757d6fbbb6170925e7",
"mattermost-redux": "github:mattermost/mattermost-redux#da357eba978b5d27f8cb4c3034e01dff959c0660",
"mime-db": "1.40.0",
"moment-timezone": "0.5.25",
"prop-types": "15.7.2",
@@ -146,4 +146,4 @@
"node_modules/(?!react-native|jail-monkey)"
]
}
}
}