...
 
Commits (4)
......@@ -375,7 +375,17 @@ exports[`channel subscribers component should render correctly 1`] = `
style={null}
>
<DiscoveryUser
entity={
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
row={
Object {
"index": 0,
"item": Object {
......@@ -464,16 +474,6 @@ exports[`channel subscribers component should render correctly 1`] = `
},
}
}
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
store={
Object {
"filter": "subscribers",
......@@ -752,7 +752,17 @@ exports[`channel subscribers component should render correctly 1`] = `
style={null}
>
<DiscoveryUser
entity={
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
row={
Object {
"index": 1,
"item": Object {
......@@ -841,16 +851,6 @@ exports[`channel subscribers component should render correctly 1`] = `
},
}
}
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
store={
Object {
"filter": "subscribers",
......@@ -1129,7 +1129,17 @@ exports[`channel subscribers component should render correctly 1`] = `
style={null}
>
<DiscoveryUser
entity={
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
row={
Object {
"index": 2,
"item": Object {
......@@ -1218,16 +1228,6 @@ exports[`channel subscribers component should render correctly 1`] = `
},
}
}
navigation={
Object {
"navigate": [MockFunction],
"state": Object {
"params": Object {
"guid": 1,
},
},
}
}
store={
Object {
"filter": "subscribers",
......
......@@ -124,7 +124,7 @@ export default class ChannelSubscribers extends Component {
*/
renderRow = (row) => {
return (
<DiscoveryUser store={this.props.channelSubscribersStore} entity={row} navigation={this.props.navigation} />
<DiscoveryUser store={this.props.channelSubscribersStore} row={row} navigation={this.props.navigation} />
);
}
}
......
......@@ -5,13 +5,17 @@ import {
import OffsetListStore from '../../common/stores/OffsetListStore';
import channelService from '../ChannelService';
import UserModel from '../UserModel';
/**
* Subscribers Store
*/
class ChannelSubscribersStore {
list = new OffsetListStore();
@observable filter = 'subscribers';
guid = '';
loading = false;
......@@ -38,6 +42,7 @@ class ChannelSubscribersStore {
return channelService.getSubscribers(this.guid, this.filter, this.list.offset)
.then( feed => {
feed.entities = UserModel.createMany(feed.entities);
this.list.setList(feed);
})
.finally(() => {
......
......@@ -403,6 +403,8 @@ export default class FeedStore {
this.refreshing = true;
try {
await this.fetchRemoteOrLocal(true);
} catch (err) {
logService.exception('[FeedStore]', err);
} finally {
this.refreshing = false;
}
......
......@@ -276,7 +276,7 @@ export default class GroupViewScreen extends Component {
return (
<GroupUser
store={this.props.groupView}
entity={row}
row={row}
navigation={this.props.navigation}
onRightIconPress={this.memberMenuPress}
isOwner={this.props.groupView.group['is:owner']}
......
......@@ -2,7 +2,6 @@ import { observable, action } from 'mobx'
import groupsService from './GroupsService';
import { setViewed } from '../newsfeed/NewsfeedService';
import OffsetFeedListStore from '../common/stores/OffsetFeedListStore';
import OffsetListStore from '../common/stores/OffsetListStore';
import UserModel from '../channel/UserModel';
......@@ -11,8 +10,6 @@ import logService from '../common/services/log.service';
import entitiesService from '../common/services/entities.service';
import GroupModel from './GroupModel';
import FeedStore from '../common/stores/FeedStore';
import featuresService from '../common/services/features.service';
import { isNetworkFail } from '../common/helpers/abortableFetch';
/**
* Groups store
......@@ -139,8 +136,8 @@ class GroupViewStore {
data.offset = data['load-next'];
this.members.setList(data);
this.assignRowKeys(data);
} catch (error) {
} catch (err) {
logService.exception(err)
} finally {
this.setLoading(false);
}
......