Skip to content

Commit

Permalink
Added simple loading message for ThreadList and ThreadChat
Browse files Browse the repository at this point in the history
  • Loading branch information
SrZorro committed Jun 21, 2018
1 parent 0e5b662 commit 2fe87a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/renderer/components/ThreadChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ export default class ThreadChat extends Component<any, any> {
if (prevMessage !== null && prevMessage.author.uid === message.author.uid)
return chatBubbles.push(<ChatBubble aminoMessage={message} left={AminoClient.uid !== message.author.uid} />);
});
else
chatBubbles.push(<h1 style={{ color: "white" }}>Loading messages...</h1>);

return (
<div class={classMain}>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/Threads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default class Threads extends Component<any, any> {
if (this.state.isHovering) classes += " " + mainHover;
return (
<div className={classes} onMouseEnter={() => { this.setState({ isHovering: true }); }} onMouseLeave={() => { this.setState({ isHovering: false }); }}>
{this.state.joinedThreadList.length === 0 ? <h1 style={{color: "white"}}>Loading chats...</h1> : null}
{this.state.joinedThreadList.map((thread) => {
return ([
<ThreadElement thread={thread} onClick={this.openThread.bind(this)} />
Expand Down

0 comments on commit 2fe87a5

Please sign in to comment.