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
166
Merge Requests
15
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
7374b714dcfeda662383b4caaaea3dde4352f400...3c5e3d34370a6c5f3253849a8582c8186411d481
Source
3c5e3d34370a6c5f3253849a8582c8186411d481
...
Target
7374b714dcfeda662383b4caaaea3dde4352f400
Compare
Commits (2)
(fix) channel updates with old data
· bfcbce1b
Martin Santangelo
authored
2 days ago
bfcbce1b
Merge branch 'fix/channels-update-twice-old-data' into 'release/3.15.0'
· 3c5e3d34
Brian Hatchet
authored
31 minutes ago
Fix channel updates with old data See merge request
!475
3c5e3d34
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
package.json
View file @
3c5e3d34
...
...
@@ -27,7 +27,7 @@
"
entities
"
:
"
^2.0.0
"
,
"
ethjs-signer
"
:
"
^0.1.1
"
,
"
i18n-js
"
:
"
^3.2.2
"
,
"
lodash
"
:
"
^4.17.1
1
"
,
"
lodash
"
:
"
^4.17.1
5
"
,
"
mobx
"
:
"
^5.14.0
"
,
"
mobx-react
"
:
"
^5.4.4
"
,
"
mobx-utils
"
:
"
^5.4.1
"
,
...
...
This diff is collapsed.
src/channel/ChannelScreen.js
View file @
3c5e3d34
...
...
@@ -43,17 +43,19 @@ export default
@
inject
(
'
channel
'
,
'
subscriptionRequest
'
)
@
observer
class
ChannelScreen
extends
Component
{
/**
* State
*/
state
=
{
guid
:
null
guid
:
null
,
};
/**
* Disable navigation bar
*/
static
navigationOptions
=
{
header
:
null
}
header
:
null
,
}
;
/**
* Load data on mount
...
...
@@ -78,6 +80,9 @@ class ChannelScreen extends Component {
}
}
/**
* Initial load
*/
async
initialLoad
()
{
const
params
=
this
.
props
.
navigation
.
state
.
params
;
...
...
@@ -92,6 +97,9 @@ class ChannelScreen extends Component {
}
}
/**
* Component will unmount
*/
componentWillUnmount
()
{
if
(
this
.
disposeEnter
)
{
this
.
disposeEnter
.
remove
();
...
...
@@ -100,8 +108,11 @@ class ChannelScreen extends Component {
this
.
props
.
channel
.
store
(
this
.
guid
).
markInactive
();
}
/**
* Load channel
* @param {string|UserModel} channelOrGuid
*/
async
loadChannel
(
channelOrGuid
)
{
const
isModel
=
channelOrGuid
instanceof
UserModel
;
const
guid
=
isModel
?
channelOrGuid
.
guid
:
channelOrGuid
;
const
store
=
this
.
props
.
channel
.
store
(
guid
);
...
...
@@ -160,14 +171,14 @@ class ChannelScreen extends Component {
// load feed now
store
.
feedStore
.
loadFeed
();
}
catch
(
err
)
{
}
catch
(
err
)
{
Alert
.
alert
(
i18n
.
t
(
'
attention
'
),
i18n
.
t
(
'
channel.notFound
'
),
[{
text
:
i18n
.
t
(
'
ok
'
),
onPress
:
()
=>
this
.
props
.
navigation
.
goBack
()
}],
{
cancelable
:
false
}
);
}
;
}
}
get
guid
()
{
...
...
This diff is collapsed.
src/channel/ChannelStore.js
View file @
3c5e3d34
import
{
observable
,
action
}
from
'
mobx
'
;
import
{
observable
,
action
}
from
'
mobx
'
;
import
{
cloneDeep
}
from
'
lodash
'
;
import
channelService
from
'
./ChannelService
'
;
import
wireService
from
'
../wire/WireService
'
;
...
...
@@ -62,6 +60,9 @@ export default class ChannelStore {
@
action
async
load
(
defaultChannel
)
{
if
(
defaultChannel
)
{
defaultChannel
=
cloneDeep
(
defaultChannel
);
}
const
channel
=
await
channelsService
.
get
(
this
.
guid
,
defaultChannel
);
if
(
channel
)
{
...
...
This diff is collapsed.