Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/ZulipStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ZulipStatusBar extends PureComponent<Props> {
render() {
const { theme, hidden, safeAreaInsets, orientation } = this.props;
const backgroundColor = this.props.backgroundColor ?? this.props.narrowTitleBackgroundColor;
const style = { height: hidden ? 0 : safeAreaInsets.top, backgroundColor };
const style = { height: safeAreaInsets.top, backgroundColor };
const statusBarColor = getStatusBarColor(backgroundColor, theme);
return (
orientation === 'PORTRAIT' && (
Expand Down
19 changes: 13 additions & 6 deletions src/lightbox/Lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { View, Dimensions, Easing } from 'react-native';
import PhotoView from 'react-native-photo-view';
import { connectActionSheet } from '@expo/react-native-action-sheet';

import type { Auth, Dispatch, Message } from '../types';
import type { Auth, Dispatch, Message, Dimensions as ZulipDimensions } from '../types';
import { connect } from '../react-redux';
import type { ShowActionSheetWithOptions } from '../message/messageActionSheet';
import { getAuth } from '../selectors';
import { getAuth, getSession } from '../selectors';
import { getResource } from '../utils/url';
import { SlideAnimationView } from '../common';
import LightboxHeader from './LightboxHeader';
Expand Down Expand Up @@ -36,12 +36,18 @@ const styles = createStyleSheet({
},
});

type Props = $ReadOnly<{|
type SelectorProps = $ReadOnly<{|
auth: Auth,
dispatch: Dispatch,
safeAreaInsets: ZulipDimensions,
|}>;

type Props = $ReadOnly<{|
src: string,
message: Message,
showActionSheetWithOptions: ShowActionSheetWithOptions,

dispatch: Dispatch,
...SelectorProps,
|}>;

type State = {|
Expand Down Expand Up @@ -90,7 +96,7 @@ class Lightbox extends PureComponent<Props, State> {
});

render() {
const { src, message, auth } = this.props;
const { src, message, auth, safeAreaInsets } = this.props;
const footerMessage =
message.type === 'stream' ? `Shared in #${message.display_recipient}` : 'Shared with you';
const resource = getResource(src, auth);
Expand All @@ -108,7 +114,7 @@ class Lightbox extends PureComponent<Props, State> {
<SlideAnimationView
property="translateY"
style={[styles.overlay, styles.header, { width }]}
from={-NAVBAR_SIZE}
from={-(NAVBAR_SIZE + safeAreaInsets.top)}
to={0}
{...this.getAnimationProps()}
>
Expand Down Expand Up @@ -136,5 +142,6 @@ class Lightbox extends PureComponent<Props, State> {
export default connectActionSheet(
connect(state => ({
auth: getAuth(state),
safeAreaInsets: getSession(state).safeAreaInsets,
}))(Lightbox),
);