Skip to content
Merged
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
6 changes: 3 additions & 3 deletions app/containers/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const getHeaderHeight = (isLandscape) => {
return 56;
};

export const getHeaderTitlePosition = insets => ({
left: 60 + insets.left,
right: 140 + insets.right
export const getHeaderTitlePosition = ({ insets, numIconsRight }) => ({
left: insets.left + 60,
right: insets.right + (45 * numIconsRight)
});

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion app/views/RoomView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class RoomView extends React.Component {
if (!room?.rid) {
return;
}
const headerTitlePosition = getHeaderTitlePosition(insets);
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 2 });
navigation.setOptions({
headerShown: true,
headerTitleAlign: 'left',
Expand Down
2 changes: 1 addition & 1 deletion app/views/RoomsListView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ class RoomsListView extends React.Component {
getHeader = () => {
const { searching } = this.state;
const { navigation, isMasterDetail, insets } = this.props;
const headerTitlePosition = getHeaderTitlePosition(insets);
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 3 });
return {
headerTitleAlign: 'left',
headerLeft: () => (searching ? (
Expand Down
2 changes: 1 addition & 1 deletion app/views/ThreadMessagesView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ class ThreadMessagesView extends React.Component {
const {
navigation, isMasterDetail, insets, theme
} = this.props;
const headerTitlePosition = getHeaderTitlePosition(insets);

if (isSearching) {
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 1 });
return {
headerTitleAlign: 'left',
headerLeft: () => (
Expand Down