From 134df7e38953ac4c6566b3efd72557cc330d038f Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 17 Jul 2020 16:54:51 +1000 Subject: [PATCH] Temporarily remove sending progress --- .../conversation/SessionConversation.tsx | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/ts/components/session/conversation/SessionConversation.tsx b/ts/components/session/conversation/SessionConversation.tsx index a961c2876..5c77514eb 100644 --- a/ts/components/session/conversation/SessionConversation.tsx +++ b/ts/components/session/conversation/SessionConversation.tsx @@ -21,6 +21,9 @@ import { MessageQueue } from '../../../session/sending'; interface State { conversationKey: string; + + // Message sending progress + messageProgressVisible: boolean; sendingProgress: number; prevSendingProgress: number; // Sending failed: -1 @@ -61,6 +64,7 @@ export class SessionConversation extends React.Component { const unreadCount = conversation.unreadCount; this.state = { + messageProgressVisible: false, sendingProgress: 0, prevSendingProgress: 0, sendingProgressStatus: 0, @@ -193,13 +197,13 @@ export class SessionConversation extends React.Component { >
{this.renderHeader()}
- + /> */}
{loading &&
} @@ -431,13 +435,10 @@ export class SessionConversation extends React.Component { this.setState({ messages, messageFetchTimestamp: timestamp }, () => { if (this.state.isScrolledToBottom) { - console.log(`[unread] Updating messages from getMessage`); this.updateReadMessages(); } }); - console.log(`[header] messages: `, messages); - return { newTopMessage, previousTopMessage }; } @@ -559,9 +560,6 @@ export class SessionConversation extends React.Component { }, }; - console.log(`[header] HeaderProps:`, headerProps); - console.log(`[header] Conv: `, conversation); - return headerProps; } @@ -652,17 +650,14 @@ export class SessionConversation extends React.Component { // Set sending state 5% to show message sending const initialValue = 5; this.updateSendingProgress(initialValue, 1); - - console.log(`[sending] Message Sending`); } public onMessageSuccess() { - console.log(`[sending] Message Sent`); this.updateSendingProgress(100, 2); + } public onMessageFailure() { - console.log(`[sending] Message Failure`); this.updateSendingProgress(100, -1); } @@ -789,14 +784,8 @@ export class SessionConversation extends React.Component { this.setState({ showScrollButton: false }); } - console.log(`[scroll] scrollOffsetPx: `, scrollOffsetPx); - console.log(`[scroll] scrollOffsetPc: `, scrollOffsetPc); - // Scrolled to bottom const isScrolledToBottom = scrollOffsetPc === 0; - if (isScrolledToBottom) { - console.log(`[scroll] Scrolled to bottom`); - } // Mark messages read this.updateReadMessages();