Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
219
Merge Requests
12
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
776a8d38af6ef2b90811c38e632742b6a4ff3bea...6511696cf402589e6f201c467945c17c551d3eaf
Source
6511696cf402589e6f201c467945c17c551d3eaf
...
Target
776a8d38af6ef2b90811c38e632742b6a4ff3bea
Compare
Commits (4)
(feat) use theme color globally for refresh controll
· 45dec538
Martin Santangelo
authored
26 minutes ago
45dec538
(fix) focus event with new navigator and tab press handling on main screens
· 3fd4d666
Martin Santangelo
authored
26 minutes ago
3fd4d666
(fix) report screen params with new nav
· 49c00668
Martin Santangelo
authored
9 minutes ago
49c00668
(fix) screens params with new nav
· 6511696c
Martin Santangelo
authored
8 minutes ago
6511696c
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
100 additions
and
163 deletions
+100
-163
App.js
View file @
6511696c
...
...
@@ -17,6 +17,7 @@ import {
Clipboard
,
StatusBar
,
UIManager
,
RefreshControl
,
}
from
'
react-native
'
;
import
{
Provider
,
observer
}
from
'
mobx-react
'
;
import
RNBootSplash
from
'
react-native-bootsplash
'
;
...
...
@@ -203,6 +204,11 @@ class App extends Component<Props, State> {
style
:
[
ThemedStyles
.
style
.
colorPrimaryText
,
{
fontFamily
:
'
Roboto
'
},
origin
.
props
.
style
]
});
};
RefreshControl
.
defaultProps
=
{
tintColor
:
ThemedStyles
.
getColor
(
'
icon_active
'
),
colors
:
ThemedStyles
.
getColor
(
'
icon_active
'
)
}
}
/**
...
...
This diff is collapsed.
src/channel/ChannelScreen.js
View file @
6511696c
...
...
@@ -54,7 +54,7 @@ class ChannelScreen extends Component {
* Load data on mount
*/
async
componentWillMount
()
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
const
params
=
this
.
props
.
route
.
params
;
const
store
=
this
.
props
.
channel
.
store
(
this
.
guid
);
if
(
params
&&
params
.
prepend
)
{
...
...
This diff is collapsed.
src/discovery/DiscoveryFeedScreen.js
View file @
6511696c
...
...
@@ -41,12 +41,6 @@ import ThemedStyles from '../styles/ThemedStyles';
@
inject
(
'
discovery
'
)
export
default
class
DiscoveryFeedScreen
extends
Component
{
static
navigationOptions
=
({
navigation
})
=>
{
return
{
'
title
'
:
navigation
.
state
.
params
.
title
||
''
}
}
/**
* Render activity
*/
...
...
This diff is collapsed.
src/discovery/DiscoveryScreen.js
View file @
6511696c
...
...
@@ -111,7 +111,7 @@ class DiscoveryScreen extends Component {
*/
componentDidMount
()
{
// load data on enter
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
setTimeout
(()
=>
{
this
.
setState
({
active
:
true
});
const
params
=
this
.
props
.
route
.
params
;
...
...
@@ -123,8 +123,15 @@ class DiscoveryScreen extends Component {
},
50
);
});
this
.
disposeTabPress
=
this
.
props
.
navigation
.
addListener
(
'
tabPress
'
,
e
=>
{
if
(
this
.
props
.
navigation
.
isFocused
())
{
stores
.
discovery
.
reload
();
e
.
preventDefault
();
}
});
// clear data on leave
this
.
disposeLeave
=
this
.
props
.
navigation
.
addListener
(
'
didB
lur
'
,
(
s
)
=>
{
this
.
disposeLeave
=
this
.
props
.
navigation
.
addListener
(
'
b
lur
'
,
(
s
)
=>
{
setTimeout
(()
=>
{
this
.
setState
({
active
:
false
});
},
50
);
...
...
@@ -138,10 +145,12 @@ class DiscoveryScreen extends Component {
if
(
this
.
disposeEnter
)
{
this
.
disposeEnter
();
}
if
(
this
.
disposeLeave
)
{
this
.
disposeLeave
();
}
if
(
this
.
disposeTabPress
)
{
this
.
disposeTabPress
();
}
}
/**
...
...
This diff is collapsed.
src/discovery/DiscoveryViewScreen.js
deleted
100644 → 0
View file @
776a8d38
import
React
,
{
Component
}
from
'
react
'
;
import
{
StyleSheet
,
FlatList
,
Text
,
View
,
ScrollView
,
Image
,
Dimensions
}
from
'
react-native
'
;
import
OwnerBlock
from
'
../newsfeed/activity/OwnerBlock
'
;
import
Actions
from
'
../newsfeed/activity/Actions
'
;
import
logService
from
'
../common/services/log.service
'
;
/**
* Discovery View screen
*/
export
default
class
DiscoveryViewScreen
extends
Component
{
state
=
{
height
:
400
};
getEntity
()
{
return
this
.
props
.
navigation
.
state
.
params
.
entity
;
}
formatDate
(
timestamp
)
{
const
t
=
new
Date
(
timestamp
*
1000
);
return
t
.
toDateString
();
}
render
()
{
const
entity
=
this
.
getEntity
();
const
view
=
this
.
getView
(
entity
);
return
(
<
ScrollView
>
<
OwnerBlock
entity
=
{
entity
.
ownerObj
}
navigation
=
{
this
.
props
.
navigation
}
>
<
Text
style
=
{
styles
.
timestamp
}
>
{
this
.
formatDate
(
entity
.
time_created
)}
<
/Text
>
<
/OwnerBlock
>
<
View
style
=
{
styles
.
textcontainer
}
>
<
Text
>
{
entity
.
title
}
<
/Text
>
<
/View
>
{
view
}
<
Actions
entity
=
{
entity
}
><
/Actions
>
<
/ScrollView
>
)
}
getView
(
entity
)
{
Image
.
getSize
(
entity
.
thumbnail_src
,
(
width
,
height
)
=>
{
this
.
setState
({
height
})
},
(
error
)
=>
{
logService
.
exception
(
`Couldn't get the image size:
${
error
.
message
}
`
);
});
switch
(
entity
.
subtype
)
{
case
'
image
'
:
const
imguri
=
{
uri
:
entity
.
thumbnail_src
};
return
<
Image
source
=
{
imguri
}
style
=
{{
height
:
this
.
state
.
height
}}
resizeMode
=
"
contain
"
/>
;
default
:
return
<
Text
>
Not
Implemented
<
/Text
>
}
}
}
const
styles
=
StyleSheet
.
create
({
textcontainer
:
{
paddingLeft
:
10
,
},
image
:
{
flex
:
1
},
timestamp
:
{
fontSize
:
11
,
color
:
'
#888
'
,
},
});
This diff is collapsed.
src/discovery/NewsfeedFilters.js
View file @
6511696c
...
...
@@ -7,7 +7,7 @@ import {
Text
,
View
,
LayoutAnimation
,
Touchable
Highlight
,
Touchable
Opacity
,
UIManager
,
StyleSheet
,
Platform
,
...
...
@@ -110,10 +110,10 @@ class NewsfeedFilters extends Component {
return
(
<
View
style
=
{
CS
.
rowJustifyStart
}
>
<
Touchable
Highlight
<
Touchable
Opacity
style
=
{[
CS
.
padding
,
CS
.
paddingLeft2x
,
CS
.
paddingRight2x
,
hashActive
?
CS
.
backgroundPrimary
:
themed
.
backgroundTertiary
,
{
borderBottomRightRadius
:
25
,
borderTopRightRadius
:
25
}]}
onPress
=
{
this
.
showDrawer
}
underlayColor
=
'
#fff
'
{...
testID
(
'
Filter hashtags selector button
'
)}
>
<
View
style
=
{[
CS
.
rowJustifyStart
,
CS
.
centered
]}
>
...
...
@@ -122,15 +122,15 @@ class NewsfeedFilters extends Component {
style
=
{[
CS
.
centered
,
(
hashActive
?
themed
.
colorWhite
:
themed
.
colorTertiaryText
),
{
paddingTop
:
2
}]}
size
=
{
20
}
/
>
{
this
.
props
.
hashtag
.
hashtag
?
<
Text
style
=
{[
CS
.
color
Icon
,
CS
.
fontM
]}
>
{
this
.
props
.
hashtag
.
hashtag
}
<
/Text> : null
}
{
this
.
props
.
hashtag
.
hashtag
?
<
Text
style
=
{[
CS
.
color
White
,
CS
.
fontM
]}
>
{
this
.
props
.
hashtag
.
hashtag
}
<
/Text> : null
}
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
Opacity
>
<
View
style
=
{[
CS
.
rowJustifySpaceEvenly
,
CS
.
flexContainer
]}
>
<
Touchable
Highlight
<
Touchable
Opacity
style
=
{[
CS
.
padding
]}
onPress
=
{
()
=>
store
.
setFilter
(
'
hot
'
)
}
disabled
=
{
disableHotLatest
}
underlayColor
=
'
#fff
'
{...
testID
(
'
Filter hot button
'
)}
>
<
View
style
=
{[
CS
.
rowJustifyCenter
,
CS
.
centered
]}
>
...
...
@@ -156,9 +156,9 @@ class NewsfeedFilters extends Component {
<
/Text
>
)
:
null
}
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
Opacity
>
<
View
style
=
{
CS
.
rowJustifyCenter
}
>
<
Touchable
Highlight
style
=
{[
CS
.
padding
]}
onPress
=
{
()
=>
store
.
setFilter
(
'
top
'
)
}
underlayColor
=
'
#fff
'
{...
testID
(
'
Filter top button
'
)}
>
<
Touchable
Opacity
style
=
{[
CS
.
padding
]}
onPress
=
{
()
=>
store
.
setFilter
(
'
top
'
)
}
{...
testID
(
'
Filter top button
'
)}
>
<
View
style
=
{[
CS
.
rowJustifyCenter
,
CS
.
centered
]}
>
<
Icon
name
=
"
trending-up
"
...
...
@@ -167,12 +167,12 @@ class NewsfeedFilters extends Component {
/
>
{
!
this
.
props
.
hashtag
.
hashtag
?
<
Text
style
=
{[
CS
.
fontM
,
store
.
filter
==
'
top
'
?
themed
.
colorIconActive
:
themed
.
colorIcon
,
CS
.
paddingLeft
]}
>
{
i18n
.
t
(
'
newsfeedFilters.top
'
)}
<
/Text> : null
}
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
Opacity
>
{
store
.
filter
==
'
top
'
&&
<
Menu
ref
=
{
this
.
setMenuRef
}
button
=
{
<
Touchable
Highlight
style
=
{[
CS
.
padding
]}
onPress
=
{
this
.
showMenu
}
>
<
Touchable
Opacity
style
=
{[
CS
.
padding
]}
onPress
=
{
this
.
showMenu
}
>
<
View
style
=
{[
CS
.
rowJustifyCenter
,
CS
.
centered
]}
>
<
Text
style
=
{[
CS
.
fontM
,
store
.
filter
==
'
top
'
?
themed
.
colorIconActive
:
themed
.
colorIcon
,
CS
.
paddingLeft
,
CS
.
paddingRight
]}
>
{
store
.
period
}
<
/Text
>
<
IonIcon
...
...
@@ -181,7 +181,7 @@ class NewsfeedFilters extends Component {
size
=
{
22
}
/
>
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
Opacity
>
}
>
<
MenuItem
onPress
=
{
this
.
setPeriod12
}
>
{
i18n
.
t
(
'
newsfeedFilters.topPeriod12
'
)}
<
/MenuItem
>
...
...
@@ -192,11 +192,11 @@ class NewsfeedFilters extends Component {
<
/Menu
>
}
<
/View
>
<
Touchable
Highlight
<
Touchable
Opacity
style
=
{[
CS
.
padding
]}
onPress
=
{
()
=>
store
.
setFilter
(
'
latest
'
)
}
disabled
=
{
disableHotLatest
}
underlayColor
=
'
#fff
'
{...
testID
(
'
Filter latest button
'
)}
>
<
View
style
=
{[
CS
.
rowJustifyCenter
,
CS
.
centered
]}
>
...
...
@@ -207,7 +207,7 @@ class NewsfeedFilters extends Component {
/
>
{
!
this
.
props
.
hashtag
.
hashtag
?
<
Text
style
=
{[
CS
.
fontM
,
store
.
filter
==
'
latest
'
?
themed
.
colorIconActive
:
(
disableHotLatest
?
themed
.
colorSeparator
:
themed
.
colorIcon
),
CS
.
paddingLeft
]}
>
{
i18n
.
t
(
'
newsfeedFilters.latest
'
)}
<
/Text> : null
}
<
/View
>
<
/Touchable
Highlight
>
<
/Touchable
Opacity
>
<
/View
>
{(
!
GOOGLE_PLAY_STORE
&&
Platform
.
OS
!==
'
ios
'
)
&&
<
View
style
=
{[
CS
.
padding
,
CS
.
paddingLeft2x
,
CS
.
paddingRight2x
]}
>
<
NsfwToggle
...
...
This diff is collapsed.
src/groups/GroupViewScreen.js
View file @
6511696c
...
...
@@ -119,7 +119,7 @@ export default class GroupViewScreen extends Component {
// load data async
this
.
initialLoad
();
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
const
params
=
this
.
props
.
route
.
params
;
if
(
params
&&
params
.
prepend
)
{
this
.
props
.
groupView
.
prepend
(
params
.
prepend
);
...
...
This diff is collapsed.
src/media/MindsVideo.js
View file @
6511696c
...
...
@@ -86,7 +86,7 @@ class MindsVideo extends Component {
onMoveShouldSetPanResponderCapture
:
(
evt
,
gestureState
)
=>
true
,
});
this
.
onScreenBlur
=
NavigationService
.
addListener
(
'
didB
lur
'
,
()
=>
{
this
.
onScreenBlur
=
NavigationService
.
addListener
(
'
b
lur
'
,
()
=>
{
this
.
pause
();
});
}
...
...
This diff is collapsed.
src/media/ViewImageScreen.js
View file @
6511696c
...
...
@@ -31,7 +31,7 @@ export default class ViewImageScreen extends Component {
constructor
(
props
)
{
super
(
props
);
const
custom_data
=
this
.
props
.
navigation
.
sta
te
.
params
.
entity
.
custom_data
;
const
custom_data
=
this
.
props
.
rou
te
.
params
.
entity
.
custom_data
;
const
width
=
Dimensions
.
get
(
'
window
'
).
width
;
...
...
@@ -49,7 +49,7 @@ export default class ViewImageScreen extends Component {
}
getSource
()
{
return
this
.
props
.
navigation
.
sta
te
.
params
.
source
;
return
this
.
props
.
rou
te
.
params
.
source
;
}
render
()
{
...
...
This diff is collapsed.
src/messenger/MessengerScreen.js
View file @
6511696c
...
...
@@ -45,7 +45,7 @@ class MessengerScreen extends Component {
componentDidMount
()
{
// // load data on enter
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
this
.
props
.
messengerList
.
loadList
(
true
);
//this.setState({ active: true });
});
...
...
This diff is collapsed.
src/navigation/NavigationStack.js
View file @
6511696c
...
...
@@ -92,7 +92,11 @@ const AppStack = function(props) {
<
AppStackNav
.
Screen
name
=
"
Capture
"
component
=
{
CapturePoster
}
/
>
<
AppStackNav
.
Screen
name
=
"
Activity
"
component
=
{
ActivityScreen
}
/
>
<
AppStackNav
.
Screen
name
=
"
Conversation
"
component
=
{
ConversationScreen
}
/
>
<
AppStackNav
.
Screen
name
=
"
DiscoveryFeed
"
component
=
{
DiscoveryFeedScreen
}
/
>
<
AppStackNav
.
Screen
name
=
"
DiscoveryFeed
"
component
=
{
DiscoveryFeedScreen
}
options
=
{({
route
})
=>
({
title
:
route
.
params
.
title
||
''
})}
/
>
<
AppStackNav
.
Screen
name
=
"
Subscribers
"
component
=
{
ChannelSubscribers
}
/
>
<
AppStackNav
.
Screen
name
=
"
Settings
"
component
=
{
SettingsScreen
}
/
>
<
AppStackNav
.
Screen
name
=
"
SettingsBlockedChannels
"
component
=
{
BlockedChannelsScreen
}
/
>
...
...
This diff is collapsed.
src/newsfeed/NewsfeedScreen.js
View file @
6511696c
...
...
@@ -64,11 +64,23 @@ export default class NewsfeedScreen extends Component {
*/
componentDidMount
()
{
this
.
disposeTabPress
=
this
.
props
.
navigation
.
addListener
(
'
tabPress
'
,
e
=>
{
if
(
this
.
props
.
navigation
.
isFocused
())
{
if
(
stores
.
newsfeed
.
filter
==
'
subscribed
'
)
{
stores
.
newsfeed
.
scrollToTop
();
stores
.
newsfeed
.
feedStore
.
refresh
(
true
)
}
else
{
stores
.
newsfeed
.
refresh
();
}
e
.
preventDefault
();
}
});
this
.
loadFeed
();
// this.props.newsfeed.loadBoosts();
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
const
params
=
this
.
props
.
navigation
.
sta
te
.
params
;
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
const
params
=
this
.
props
.
rou
te
.
params
;
if
(
params
&&
params
.
prepend
)
{
this
.
props
.
newsfeed
.
prepend
(
params
.
prepend
);
...
...
@@ -106,6 +118,9 @@ export default class NewsfeedScreen extends Component {
if
(
this
.
disposeEnter
)
{
this
.
disposeEnter
();
}
if
(
this
.
disposeTabPress
)
{
this
.
disposeTabPress
();
}
}
setGroupsBarRef
=
(
r
)
=>
this
.
groupsBar
=
r
;
...
...
This diff is collapsed.
src/newsfeed/activity/ActivityActionSheet.js
View file @
6511696c
...
...
@@ -192,7 +192,7 @@ export default class ActivityActionSheet extends Component {
{
cancelable
:
false
}
);
if
(
this
.
props
.
navigation
.
sta
te
.
routeName
==
'
Activity
'
)
{
if
(
this
.
props
.
rou
te
.
routeName
==
'
Activity
'
)
{
this
.
props
.
navigation
.
goBack
();
}
}
catch
(
err
)
{
...
...
This diff is collapsed.
src/newsfeed/activity/OwnerBlock.js
View file @
6511696c
...
...
@@ -41,7 +41,7 @@ export default class OwnerBlock extends PureComponent {
if
(
this
.
props
.
navigation
)
{
let
groupGuid
;
try
{
groupGuid
=
this
.
props
.
navigation
.
state
.
params
.
group
?
this
.
props
.
navigation
.
state
.
params
.
group
.
guid
:
this
.
props
.
navigation
.
sta
te
.
params
.
guid
;
groupGuid
=
this
.
props
.
route
.
params
.
group
?
this
.
props
.
route
.
params
.
group
.
guid
:
this
.
props
.
rou
te
.
params
.
guid
;
}
catch
{}
if
(
groupGuid
==
this
.
props
.
entity
.
containerObj
.
guid
)
return
;
...
...
This diff is collapsed.
src/onboarding/EmailConfirmationScreen.js
View file @
6511696c
...
...
@@ -38,7 +38,7 @@ export default class EmailConfirmationScreen extends Component {
const
result
=
await
sessionService
.
getUser
()
.
confirmEmail
(
this
.
props
.
navigation
.
sta
te
.
params
);
.
confirmEmail
(
this
.
props
.
rou
te
.
params
);
if
(
!
result
)
{
this
.
setState
({
error
:
true
});
...
...
This diff is collapsed.
src/report/ReportScreen.js
View file @
6511696c
...
...
@@ -24,36 +24,10 @@ import i18n from '../common/services/i18n.service';
import
mindsService
from
'
../common/services/minds.service
'
;
import
CenteredLoading
from
'
../common/components/CenteredLoading
'
;
import
ThemedStyles
from
'
../styles/ThemedStyles
'
;
export
default
class
ReportScreen
extends
Component
{
static
navigationOptions
=
({
navigation
})
=>
({
title
:
i18n
.
t
(
'
report
'
),
headerLeft
:
()
=>
{
return
<
Icon
name
=
"
chevron-left
"
size
=
{
38
}
color
=
{
colors
.
primary
}
onPress
=
{
()
=>
{
if
(
navigation
.
state
.
params
&&
navigation
.
state
.
params
.
goBack
)
return
navigation
.
state
.
params
.
goBack
();
navigation
.
goBack
();
}
}
/
>
},
headerRight
:
(
<
View
>
{
navigation
.
state
.
params
.
requireNote
&&
<
Button
title
=
{
i18n
.
t
(
'
settings.submit
'
)}
onPress
=
{
navigation
.
state
.
params
.
confirmAndSubmit
?
navigation
.
state
.
params
.
confirmAndSubmit
:
()
=>
null
}
/
>
}
<
/View
>
),
transitionConfig
:
{
isModal
:
true
},
});
state
=
{
note
:
''
,
reason
:
null
,
...
...
@@ -65,8 +39,37 @@ export default class ReportScreen extends Component {
* Component did mount
*/
componentDidMount
()
{
const
navigation
=
this
.
props
.
navigation
;
navigation
.
setOptions
({
title
:
i18n
.
t
(
'
report
'
),
headerLeft
:
()
=>
{
return
<
Icon
name
=
"
chevron-left
"
size
=
{
38
}
color
=
{
colors
.
primary
}
onPress
=
{
()
=>
{
if
(
this
.
props
.
route
.
params
&&
this
.
props
.
route
.
params
.
goBack
)
return
this
.
props
.
route
.
params
.
goBack
();
navigation
.
goBack
();
}
}
/
>
},
headerRight
:
()
=>
(
<
View
>
{
this
.
props
.
route
.
params
.
requireNote
&&
<
Button
title
=
{
i18n
.
t
(
'
settings.submit
'
)}
onPress
=
{
this
.
props
.
route
.
params
.
confirmAndSubmit
?
this
.
props
.
route
.
params
.
confirmAndSubmit
:
()
=>
null
}
/
>
}
<
/View
>
),
transitionConfig
:
{
isModal
:
true
},
});
this
.
setState
({
entity
:
this
.
props
.
navigation
.
sta
te
.
params
.
entity
,
entity
:
this
.
props
.
rou
te
.
params
.
entity
,
});
this
.
loadReasons
();
this
.
props
.
navigation
.
setParams
({
confirmAndSubmit
:
this
.
confirmAndSubmit
.
bind
(
this
)
});
...
...
@@ -205,7 +208,7 @@ export default class ReportScreen extends Component {
const
reasonItems
=
reasons
.
map
((
reason
,
i
)
=>
{
return
(
<
TouchableOpacity
style
=
{
styles
.
reasonItem
}
key
=
{
i
}
onPress
=
{
()
=>
this
.
state
.
reason
?
this
.
selectSubreason
(
reason
)
:
this
.
selectReason
(
reason
)
}
>
<
TouchableOpacity
style
=
{
[
styles
.
reasonItem
,
ThemedStyles
.
backgroundTertiary
]
}
key
=
{
i
}
onPress
=
{
()
=>
this
.
state
.
reason
?
this
.
selectSubreason
(
reason
)
:
this
.
selectReason
(
reason
)
}
>
<
View
style
=
{
styles
.
reasonItemLabelContainer
}
>
<
View
style
=
{{
flexDirection
:
'
row
'
,
alignItems
:
'
stretch
'
}}
>
<
Text
style
=
{
styles
.
reasonItemLabel
}
>
{
reason
.
label
}
<
/Text
>
...
...
@@ -247,9 +250,9 @@ export default class ReportScreen extends Component {
);
return
(
<
ScrollView
style
=
{
CS
.
flexContainer
}
>
<
ScrollView
style
=
{
[
CS
.
flexContainer
,
ThemedStyles
.
style
.
backgroundSecondary
]
}
>
{
this
.
state
.
reason
&&
<
Text
style
=
{[
CS
.
fontM
,
CS
.
backgroundPrimary
,
CS
.
colorWhite
,
CS
.
padding
]}
>
{
this
.
state
.
reason
.
label
}
<
/Text>
}
<
View
style
=
{
{
flex
:
1
}
}
>
<
View
style
=
{
CS
.
flexContainer
}
>
{
!
this
.
state
.
requireNote
&&
this
.
renderReasons
()
}
{
this
.
state
.
requireNote
&&
noteInput
}
...
...
@@ -268,9 +271,6 @@ const styles = StyleSheet.create({
paddingRight
:
16
,
paddingTop
:
8
,
paddingBottom
:
8
,
backgroundColor
:
'
#FFF
'
,
borderBottomWidth
:
1
,
borderBottomColor
:
'
#ececec
'
,
},
reasonItemLabelContainer
:
{
flex
:
1
,
...
...
@@ -281,7 +281,6 @@ const styles = StyleSheet.create({
reasonItemLabel
:
{
flex
:
1
,
fontWeight
:
'
600
'
,
color
:
'
#444
'
,
textAlign
:
'
left
'
,
},
chevronContainer
:
{
...
...
This diff is collapsed.
src/wallet/WalletScreen.js
View file @
6511696c
...
...
@@ -54,7 +54,7 @@ export default class WalletScreen extends Component {
componentWillMount
()
{
if
(
FeaturesService
.
has
(
'
crypto
'
))
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
async
()
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
async
()
=>
{
if
((
await
this
.
props
.
wallet
.
canShowOnboarding
())
&&
(
!
this
.
props
.
user
.
hasRewards
()
||
!
this
.
props
.
user
.
hasEthWallet
()))
{
setImmediate
(()
=>
{
this
.
props
.
navigation
.
navigate
(
'
WalletOnboarding
'
);
...
...
This diff is collapsed.
src/wallet/balances/WalletBalanceTokens.js
View file @
6511696c
...
...
@@ -24,7 +24,7 @@ export default class WalletBalanceTokens extends Component {
}
componentWillMount
()
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
didF
ocus
'
,
(
s
)
=>
{
this
.
disposeEnter
=
this
.
props
.
navigation
.
addListener
(
'
f
ocus
'
,
(
s
)
=>
{
// ignore back navigation
if
(
s
.
action
.
type
===
'
Navigation/NAVIGATE
'
&&
s
.
action
.
routeName
===
'
Wallet
'
)
{
this
.
triggerRender
(
this
.
props
.
wallet
);
...
...
This diff is collapsed.