Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fairchat.ReactNative
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairchat.ReactNative
Commits
27de8c1f
Unverified
Commit
27de8c1f
authored
5 years ago
by
Diego Mello
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[REGRESSION] Get rooms on app restore (#958)
parent
86b79be1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/views/RoomsListView/index.js
+10
-12
10 additions, 12 deletions
app/views/RoomsListView/index.js
with
10 additions
and
12 deletions
app/views/RoomsListView/index.js
+
10
−
12
View file @
27de8c1f
...
...
@@ -19,8 +19,8 @@ import ServerDropdown from './ServerDropdown';
import
{
toggleSortDropdown
as
toggleSortDropdownAction
,
openSearchHeader
as
openSearchHeaderAction
,
closeSearchHeader
as
closeSearchHeaderAction
//
roomsRequest as roomsRequestAction
closeSearchHeader
as
closeSearchHeaderAction
,
roomsRequest
as
roomsRequestAction
}
from
'
../../actions/rooms
'
;
import
{
appStart
as
appStartAction
}
from
'
../../actions
'
;
import
debounce
from
'
../../utils/debounce
'
;
...
...
@@ -55,8 +55,8 @@ const keyExtractor = item => item.rid;
toggleSortDropdown
:
()
=>
dispatch
(
toggleSortDropdownAction
()),
openSearchHeader
:
()
=>
dispatch
(
openSearchHeaderAction
()),
closeSearchHeader
:
()
=>
dispatch
(
closeSearchHeaderAction
()),
appStart
:
()
=>
dispatch
(
appStartAction
())
//
roomsRequest: () => dispatch(roomsRequestAction())
appStart
:
()
=>
dispatch
(
appStartAction
())
,
roomsRequest
:
()
=>
dispatch
(
roomsRequestAction
())
}))
export
default
class
RoomsListView
extends
React
.
Component
{
static
navigationOptions
=
({
navigation
})
=>
{
...
...
@@ -104,12 +104,12 @@ export default class RoomsListView extends React.Component {
showUnread
:
PropTypes
.
bool
,
useRealName
:
PropTypes
.
bool
,
StoreLastMessage
:
PropTypes
.
bool
,
//
appState: PropTypes.string,
appState
:
PropTypes
.
string
,
toggleSortDropdown
:
PropTypes
.
func
,
openSearchHeader
:
PropTypes
.
func
,
closeSearchHeader
:
PropTypes
.
func
,
appStart
:
PropTypes
.
func
//
roomsRequest: PropTypes.func
appStart
:
PropTypes
.
func
,
roomsRequest
:
PropTypes
.
func
}
constructor
(
props
)
{
...
...
@@ -185,7 +185,7 @@ export default class RoomsListView extends React.Component {
componentDidUpdate
(
prevProps
)
{
const
{
sortBy
,
groupByType
,
showFavorites
,
showUnread
sortBy
,
groupByType
,
showFavorites
,
showUnread
,
appState
,
roomsRequest
}
=
this
.
props
;
if
(
!
(
...
...
@@ -195,11 +195,9 @@ export default class RoomsListView extends React.Component {
&&
(
prevProps
.
showUnread
===
showUnread
)
))
{
this
.
getSubscriptions
();
}
else
if
(
appState
===
'
foreground
'
&&
appState
!==
prevProps
.
appState
)
{
roomsRequest
();
}
// removed for now... we may not need it anymore
// else if (appState === 'foreground' && appState !== prevProps.appState) {
// // roomsRequest();
// }
}
componentWillUnmount
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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