Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
gencay tekin
jitsi-meet
Commits
a42483c8
Unverified
Commit
a42483c8
authored
3 years ago
by
Robert Pintilii
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(rn, tileview) Add SafeAreaView to Tile View (#10642)
parent
476ddeac
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
react/features/filmstrip/components/native/TileView.js
+20
-10
react/features/filmstrip/components/native/TileView.js
with
20 additions
and
10 deletions
react/features/filmstrip/components/native/TileView.js
+
20
−
10
View file @
a42483c8
...
...
@@ -3,9 +3,10 @@
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
FlatList
,
TouchableWithoutFeedback
,
View
SafeAreaView
,
TouchableWithoutFeedback
}
from
'
react-native
'
;
import
{
withSafeAreaInsets
}
from
'
react-native-safe-area-context
'
;
import
type
{
Dispatch
}
from
'
redux
'
;
import
{
getLocalParticipant
,
getParticipantCountWithFake
}
from
'
../../../base/participants
'
;
...
...
@@ -71,6 +72,11 @@ type Props = {
*/
dispatch
:
Dispatch
<
any
>
,
/**
* Object containing the safe area insets.
*/
insets
:
Object
,
/**
* Callback to invoke when tile view is tapped.
*/
...
...
@@ -126,7 +132,8 @@ class TileView extends PureComponent<Props> {
...
styles
.
flatListTileView
};
this
.
_contentContainerStyles
=
{
...
styles
.
contentContainer
...
styles
.
contentContainer
,
paddingBottom
:
this
.
props
.
insets
?.
bottom
||
0
};
}
...
...
@@ -194,13 +201,14 @@ class TileView extends PureComponent<Props> {
this
.
_contentContainerStyles
=
{
...
styles
.
contentContainer
,
minHeight
:
_height
,
minWidth
:
_width
minWidth
:
_width
,
paddingBottom
:
this
.
props
.
insets
?.
bottom
||
0
};
}
return
(
<
TouchableWithoutFeedback
onPress
=
{
onClick
}
>
<
View
style
=
{
styles
.
flatListContainer
}
>
<
SafeArea
View
style
=
{
styles
.
flatListContainer
}
>
<
FlatList
bounces
=
{
false
}
contentContainerStyle
=
{
this
.
_contentContainerStyles
}
...
...
@@ -217,7 +225,7 @@ class TileView extends PureComponent<Props> {
style
=
{
this
.
_flatListStyles
}
viewabilityConfig
=
{
this
.
_viewabilityConfig
}
windowSize
=
{
2
}
/
>
<
/View
>
<
/
SafeArea
View
>
<
/TouchableWithoutFeedback
>
);
}
...
...
@@ -269,10 +277,11 @@ class TileView extends PureComponent<Props> {
* Maps (parts of) the redux state to the associated {@code TileView}'s props.
*
* @param {Object} state - The redux state.
* @param {Object} ownProps - Component props.
* @private
* @returns {Props}
*/
function
_mapStateToProps
(
state
)
{
function
_mapStateToProps
(
state
,
ownProps
)
{
const
responsiveUi
=
state
[
'
features/base/responsive-ui
'
];
const
{
remoteParticipants
,
tileViewDimensions
}
=
state
[
'
features/filmstrip
'
];
const
disableSelfView
=
shouldHideSelfView
(
state
);
...
...
@@ -283,13 +292,14 @@ function _mapStateToProps(state) {
_aspectRatio
:
responsiveUi
.
aspectRatio
,
_columns
:
columns
,
_disableSelfView
:
disableSelfView
,
_height
:
responsiveUi
.
clientHeight
,
_height
:
responsiveUi
.
clientHeight
-
(
ownProps
.
insets
?.
top
||
0
),
_insets
:
ownProps
.
insets
,
_localParticipant
:
getLocalParticipant
(
state
),
_participantCount
:
getParticipantCountWithFake
(
state
),
_remoteParticipants
:
remoteParticipants
,
_thumbnailHeight
:
height
,
_width
:
responsiveUi
.
clientWidth
_width
:
responsiveUi
.
clientWidth
-
(
ownProps
.
insets
?.
right
||
0
)
-
(
ownProps
.
insets
?.
left
||
0
)
};
}
export
default
connect
(
_mapStateToProps
)(
TileView
);
export
default
withSafeAreaInsets
(
connect
(
_mapStateToProps
)(
TileView
)
)
;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets