forked from Ivasoft/mattermost-mobile
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b16c87988e | ||
|
|
361528de86 | ||
|
|
f71d9568ce | ||
|
|
f117281bec | ||
|
|
995704df00 | ||
|
|
cb912bb175 | ||
|
|
a99d6f8b82 | ||
|
|
d68962d230 | ||
|
|
339ff1ae8f | ||
|
|
ffa4a2253e | ||
|
|
fbdec3d42b | ||
|
|
c996c05eca | ||
|
|
f8808b0eaf |
@@ -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'
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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)"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user