Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (3)
(feat) remove nsfw toggles from ios
· 4055a233
Martin Santangelo
authored
May 22, 2019
4055a233
(feat) disable nsfw values for ios
· 7cdab7fd
Martin Santangelo
authored
May 22, 2019
7cdab7fd
Merge branch 'v3.6.0'
· ef0bcee5
Martin Santangelo
authored
May 22, 2019
ef0bcee5
Hide whitespace changes
Inline
Side-by-side
src/capture/CapturePosterFlags.js
View file @
ef0bcee5
import
React
,
{
Component
}
from
'
react
'
;
import
{
Text
,
TextInput
,
View
,
StyleSheet
}
from
'
react-native
'
;
import
{
Text
,
TextInput
,
View
,
StyleSheet
,
Platform
}
from
'
react-native
'
;
import
{
inject
,
observer
}
from
'
mobx-react/native
'
;
import
FaIcon
from
'
react-native-vector-icons/FontAwesome
'
;
import
IonIcon
from
'
react-native-vector-icons/Ionicons
'
;
...
...
@@ -326,7 +326,7 @@ export default class CapturePosterFlags extends Component {
}
renderNsfw
()
{
if
(
GOOGLE_PLAY_STORE
)
return
null
;
if
(
GOOGLE_PLAY_STORE
||
Platform
.
OS
===
'
ios
'
)
return
null
;
return
(
<
NsfwToggle
containerStyle
=
{
styles
.
cell
}
...
...
src/common/services/nsfw.service.js
View file @
ef0bcee5
import
AsyncStorage
from
'
@react-native-community/async-storage
'
;
import
{
Platform
}
from
"
react-native
"
;
class
NsfwService
{
constructor
(
target
)
{
...
...
@@ -13,6 +14,7 @@ class NsfwService {
* @returns {Promise<number[]>}
*/
async
get
()
{
if
(
Platform
.
OS
===
'
ios
'
)
return
[];
try
{
const
value
=
await
AsyncStorage
.
getItem
(
this
.
_getStorageKey
());
return
value
?
JSON
.
parse
(
value
)
:
[];
...
...
src/discovery/NewsfeedFilters.js
View file @
ef0bcee5
...
...
@@ -9,6 +9,7 @@ import {
LayoutAnimation
,
TouchableHighlight
,
StyleSheet
,
Platform
,
}
from
'
react-native
'
;
import
{
...
...
@@ -172,7 +173,7 @@ export default class NewsfeedFilters extends Component {
<
/View
>
<
/TouchableHighlight
>
<
/View
>
{
!
GOOGLE_PLAY_STORE
&&
<
View
style
=
{[
CS
.
padding
,
CS
.
paddingLeft2x
,
CS
.
paddingRight2x
]}
>
{
(
!
GOOGLE_PLAY_STORE
&&
Platform
.
OS
!==
'
ios
'
)
&&
<
View
style
=
{[
CS
.
padding
,
CS
.
paddingLeft2x
,
CS
.
paddingRight2x
]}
>
<
NsfwToggle
hideLabel
=
{
true
}
value
=
{
store
.
nsfw
}
...
...