Skip to content

Commit

Permalink
[chat] Added dirty hack to show empty chat. It's needed to test DApps.
Browse files Browse the repository at this point in the history
  • Loading branch information
seland committed Sep 20, 2018
1 parent 9e115bb commit b20e2f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/screens/PrivateChat/Chat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ class ChatScreen extends Component<Props, *> {
];

const session = getSelectedSession(this.props.sessions, this.props.recipientPublicKey);
if (session == null) {
return <View />;
}
let messages: Array<GiftedChatMessageType> = session.messages;
// if (session == null) {
// return <View />;
// }
let messages: Array<GiftedChatMessageType> = session != null ? session.messages : [];
messages = messages
.map((message) => {
if (message.dAppMessage == null) return message;
Expand Down
4 changes: 2 additions & 2 deletions src/screens/PrivateChat/ChatList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ class ChatListScreen extends NavigatorComponent<Props, State> {
};

goToContactsPicker = () => {
this.props.navigator.showModal({
...screen('CONTACTS_PICKER_SCREEN'),
this.props.navigator.push({
...screen('PRIVATE_CHAT_SCREEN'),
});
};

Expand Down

0 comments on commit b20e2f7

Please sign in to comment.