Remove insets hoc from RoomsListView

This commit is contained in:
Diego Mello 2022-12-07 11:19:19 -03:00
parent 15bb21eb2f
commit ffb31d399d
1 changed files with 1 additions and 7 deletions

View File

@ -4,7 +4,6 @@ import { batch, connect } from 'react-redux';
import { dequal } from 'dequal'; import { dequal } from 'dequal';
import Orientation from 'react-native-orientation-locker'; import Orientation from 'react-native-orientation-locker';
import { Q } from '@nozbe/watermelondb'; import { Q } from '@nozbe/watermelondb';
import { withSafeAreaInsets } from 'react-native-safe-area-context';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { StackNavigationOptions, StackNavigationProp } from '@react-navigation/stack'; import { StackNavigationOptions, StackNavigationProp } from '@react-navigation/stack';
import { Header } from '@react-navigation/elements'; import { Header } from '@react-navigation/elements';
@ -85,7 +84,6 @@ interface IRoomsListViewProps {
useRealName: boolean; useRealName: boolean;
isMasterDetail: boolean; isMasterDetail: boolean;
subscribedRoom: string; subscribedRoom: string;
insets: { left: number; bottom: number; right: number; top: number };
queueSize: number; queueSize: number;
inquiryEnabled: boolean; inquiryEnabled: boolean;
encryptionBanner: string; encryptionBanner: string;
@ -207,7 +205,6 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
showUnread, showUnread,
subscribedRoom, subscribedRoom,
isMasterDetail, isMasterDetail,
insets,
createTeamPermission, createTeamPermission,
createPublicChannelPermission, createPublicChannelPermission,
createPrivateChannelPermission, createPrivateChannelPermission,
@ -234,9 +231,6 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
if (isMasterDetail && item?.rid !== subscribedRoom && subscribedRoom !== prevProps.subscribedRoom) { if (isMasterDetail && item?.rid !== subscribedRoom && subscribedRoom !== prevProps.subscribedRoom) {
this.setState({ item: { rid: subscribedRoom } as ISubscription }); this.setState({ item: { rid: subscribedRoom } as ISubscription });
} }
if (insets.left !== prevProps.insets.left || insets.right !== prevProps.insets.right) {
this.setHeader();
}
if ( if (
!dequal(createTeamPermission, prevProps.createTeamPermission) || !dequal(createTeamPermission, prevProps.createTeamPermission) ||
@ -908,4 +902,4 @@ const mapStateToProps = (state: IApplicationState) => ({
createDiscussionPermission: state.permissions['start-discussion'] createDiscussionPermission: state.permissions['start-discussion']
}); });
export default connect(mapStateToProps)(withTheme(withSafeAreaInsets(RoomsListView))); export default connect(mapStateToProps)(withTheme(RoomsListView));