Commit 78f22698 authored by Martin Santangelo's avatar Martin Santangelo

Merge branch 'release/3.11.0' into feat/permissions-implementation-model-activitysheet-channels

parents 8a2b74ce 83cd63c2
......@@ -202,6 +202,8 @@ class EntitiesService {
for (const entity of response.entities) {
this.addEntity(entity);
}
return response.entities;
} catch (err) {
// if the server response is a 403
......
......@@ -20,6 +20,7 @@ import Image from "react-native-image-progress";
import { CommonStyle } from "../../styles/Common";
import Touchable from "../../common/components/Touchable";
import Colors from "../../styles/Colors";
import CenteredLoading from '../../common/components/CenteredLoading';
export default class BlockedChannelsScreen extends Component {
static navigationOptions = {
......@@ -31,6 +32,7 @@ export default class BlockedChannelsScreen extends Component {
this.state = {
channels: [],
loading: true
}
}
......@@ -39,14 +41,12 @@ export default class BlockedChannelsScreen extends Component {
}
async load() {
await blockListService.doSync();
const guids = await blockListService.getList();
const channels = (await entitiesService.fetch(guids))
.filter(channel => Boolean(channel));
const channels = (await entitiesService.fetch(Array.from(guids.keys())));
//.filter(channel => Boolean(channel));
this.setState({
channels,
loading: false
});
}
......@@ -103,6 +103,10 @@ export default class BlockedChannelsScreen extends Component {
}
render() {
if (this.state.loading) {
return <CenteredLoading />
}
const rows = [];
for (const channel of this.state.channels) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment