Temporarily remove sending progress

pull/1279/head
Vincent 5 years ago
parent 79e821e342
commit 134df7e389

@ -21,6 +21,9 @@ import { MessageQueue } from '../../../session/sending';
interface State { interface State {
conversationKey: string; conversationKey: string;
// Message sending progress
messageProgressVisible: boolean;
sendingProgress: number; sendingProgress: number;
prevSendingProgress: number; prevSendingProgress: number;
// Sending failed: -1 // Sending failed: -1
@ -61,6 +64,7 @@ export class SessionConversation extends React.Component<any, State> {
const unreadCount = conversation.unreadCount; const unreadCount = conversation.unreadCount;
this.state = { this.state = {
messageProgressVisible: false,
sendingProgress: 0, sendingProgress: 0,
prevSendingProgress: 0, prevSendingProgress: 0,
sendingProgressStatus: 0, sendingProgressStatus: 0,
@ -193,13 +197,13 @@ export class SessionConversation extends React.Component<any, State> {
> >
<div className="conversation-header">{this.renderHeader()}</div> <div className="conversation-header">{this.renderHeader()}</div>
<SessionProgress {/* <SessionProgress
visible={true} visible={this.state.messageProgressVisible}
value={this.state.sendingProgress} value={this.state.sendingProgress}
prevValue={this.state.prevSendingProgress} prevValue={this.state.prevSendingProgress}
sendStatus={this.state.sendingProgressStatus} sendStatus={this.state.sendingProgressStatus}
resetProgress={this.resetSendingProgress} resetProgress={this.resetSendingProgress}
/> /> */}
<div className="messages-wrapper"> <div className="messages-wrapper">
{loading && <div className="messages-container__loading" />} {loading && <div className="messages-container__loading" />}
@ -431,13 +435,10 @@ export class SessionConversation extends React.Component<any, State> {
this.setState({ messages, messageFetchTimestamp: timestamp }, () => { this.setState({ messages, messageFetchTimestamp: timestamp }, () => {
if (this.state.isScrolledToBottom) { if (this.state.isScrolledToBottom) {
console.log(`[unread] Updating messages from getMessage`);
this.updateReadMessages(); this.updateReadMessages();
} }
}); });
console.log(`[header] messages: `, messages);
return { newTopMessage, previousTopMessage }; return { newTopMessage, previousTopMessage };
} }
@ -559,9 +560,6 @@ export class SessionConversation extends React.Component<any, State> {
}, },
}; };
console.log(`[header] HeaderProps:`, headerProps);
console.log(`[header] Conv: `, conversation);
return headerProps; return headerProps;
} }
@ -652,17 +650,14 @@ export class SessionConversation extends React.Component<any, State> {
// Set sending state 5% to show message sending // Set sending state 5% to show message sending
const initialValue = 5; const initialValue = 5;
this.updateSendingProgress(initialValue, 1); this.updateSendingProgress(initialValue, 1);
console.log(`[sending] Message Sending`);
} }
public onMessageSuccess() { public onMessageSuccess() {
console.log(`[sending] Message Sent`);
this.updateSendingProgress(100, 2); this.updateSendingProgress(100, 2);
} }
public onMessageFailure() { public onMessageFailure() {
console.log(`[sending] Message Failure`);
this.updateSendingProgress(100, -1); this.updateSendingProgress(100, -1);
} }
@ -789,14 +784,8 @@ export class SessionConversation extends React.Component<any, State> {
this.setState({ showScrollButton: false }); this.setState({ showScrollButton: false });
} }
console.log(`[scroll] scrollOffsetPx: `, scrollOffsetPx);
console.log(`[scroll] scrollOffsetPc: `, scrollOffsetPc);
// Scrolled to bottom // Scrolled to bottom
const isScrolledToBottom = scrollOffsetPc === 0; const isScrolledToBottom = scrollOffsetPc === 0;
if (isScrolledToBottom) {
console.log(`[scroll] Scrolled to bottom`);
}
// Mark messages read // Mark messages read
this.updateReadMessages(); this.updateReadMessages();

Loading…
Cancel
Save