Fix server url (#1361)
* Fix server url * Fix offline indicator positioning * Upgrade mattermost-redux with fix for loading custom emojis * feedback review
This commit is contained in:
parent
fff887bf85
commit
998a5bdb0d
4 changed files with 26 additions and 13 deletions
|
|
@ -15,6 +15,7 @@ import DeviceInfo from 'react-native-device-info';
|
|||
import IonIcon from 'react-native-vector-icons/Ionicons';
|
||||
|
||||
import FormattedText from 'app/components/formatted_text';
|
||||
import {ViewTypes} from 'app/constants';
|
||||
import checkNetwork from 'app/utils/network';
|
||||
|
||||
import {RequestStatus} from 'mattermost-redux/constants';
|
||||
|
|
@ -23,6 +24,14 @@ const HEIGHT = 38;
|
|||
const OFFLINE = 'offline';
|
||||
const CONNECTING = 'connecting';
|
||||
const CONNECTED = 'connected';
|
||||
const {
|
||||
ANDROID_TOP_LANDSCAPE,
|
||||
ANDROID_TOP_PORTRAIT,
|
||||
IOS_TOP_LANDSCAPE,
|
||||
IOS_TOP_PORTRAIT,
|
||||
IOSX_TOP_PORTRAIT,
|
||||
STATUS_BAR_HEIGHT
|
||||
} = ViewTypes;
|
||||
|
||||
export default class OfflineIndicator extends Component {
|
||||
static propTypes = {
|
||||
|
|
@ -126,20 +135,23 @@ export default class OfflineIndicator extends Component {
|
|||
};
|
||||
|
||||
getNavBarHeight = (isLandscape) => {
|
||||
let navBar = 46;
|
||||
if (Platform.OS === 'ios') {
|
||||
if (this.isX && isLandscape) {
|
||||
navBar = 32;
|
||||
} else if (this.isX) {
|
||||
navBar = 88;
|
||||
} else if (isLandscape) {
|
||||
navBar = 52;
|
||||
} else {
|
||||
navBar = 64;
|
||||
if (Platform.OS === 'android') {
|
||||
if (isLandscape) {
|
||||
return ANDROID_TOP_LANDSCAPE;
|
||||
}
|
||||
|
||||
return ANDROID_TOP_PORTRAIT;
|
||||
}
|
||||
|
||||
return navBar;
|
||||
if (this.isX && isLandscape) {
|
||||
return IOS_TOP_LANDSCAPE;
|
||||
} else if (this.isX) {
|
||||
return IOSX_TOP_PORTRAIT;
|
||||
} else if (isLandscape) {
|
||||
return IOS_TOP_LANDSCAPE + STATUS_BAR_HEIGHT;
|
||||
}
|
||||
|
||||
return IOS_TOP_PORTRAIT;
|
||||
};
|
||||
|
||||
offline = () => {
|
||||
|
|
|
|||
|
|
@ -74,5 +74,6 @@ export default {
|
|||
ANDROID_TOP_PORTRAIT: 56,
|
||||
IOS_TOP_LANDSCAPE: 32,
|
||||
IOS_TOP_PORTRAIT: 64,
|
||||
IOSX_TOP_PORTRAIT: 88,
|
||||
STATUS_BAR_HEIGHT: 20
|
||||
};
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class SelectServer extends PureComponent {
|
|||
};
|
||||
|
||||
onClick = wrapWithPreventDoubleTap(async () => {
|
||||
const preUrl = urlParse(this.props.serverUrl, true);
|
||||
const preUrl = urlParse(this.state.url, true);
|
||||
const url = stripTrailingSlashes(preUrl.protocol + '//' + preUrl.host);
|
||||
|
||||
Keyboard.dismiss();
|
||||
|
|
|
|||
|
|
@ -3974,7 +3974,7 @@ makeerror@1.0.x:
|
|||
|
||||
mattermost-redux@mattermost/mattermost-redux:
|
||||
version "1.1.0"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/94861ab29626f54fa8c40a2a6a5fa3f3850c7299"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/b927e62835ef7f0015e4a5f8908f613d3492865d"
|
||||
dependencies:
|
||||
deep-equal "1.0.1"
|
||||
form-data "2.3.1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue