diff --git a/main.js b/main.js index e0d0cb770..c64ac5752 100644 --- a/main.js +++ b/main.js @@ -27,7 +27,9 @@ const { shell, } = electron; -const appUserModelId = `org.whispersystems.${packageJson.name}`; +// FIXME Hardcoding appId to prevent build failrues on release. +// const appUserModelId = packageJson.build.appId; +const appUserModelId = 'com.loki-project.messenger-desktop'; console.log('Set Windows Application User Model ID (AUMID)', { appUserModelId, }); diff --git a/ts/components/session/conversation/SessionConversation.tsx b/ts/components/session/conversation/SessionConversation.tsx index 938553701..bcd1beea6 100644 --- a/ts/components/session/conversation/SessionConversation.tsx +++ b/ts/components/session/conversation/SessionConversation.tsx @@ -31,8 +31,10 @@ interface State { doneInitialScroll: boolean; displayScrollToBottomButton: boolean; messageFetchTimestamp: number; + showRecordingView: boolean; showOptionsPane: boolean; + showScrollButton: boolean; } export class SessionConversation extends React.Component { @@ -60,8 +62,10 @@ export class SessionConversation extends React.Component { doneInitialScroll: false, displayScrollToBottomButton: false, messageFetchTimestamp: 0, + showRecordingView: false, showOptionsPane: false, + showScrollButton: false, }; this.handleScroll = this.handleScroll.bind(this); @@ -139,7 +143,7 @@ export class SessionConversation extends React.Component { // ~~~~~~~~~~~~~~ RENDER METHODS ~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public render() { - const { messages, conversationKey, doneInitialScroll, showRecordingView, showOptionsPane } = this.state; + const { messages, conversationKey, doneInitialScroll, showRecordingView, showOptionsPane, showScrollButton } = this.state; const loading = !doneInitialScroll || messages.length === 0; const selectionMode = !!this.state.selectedMessages.length; @@ -184,7 +188,7 @@ export class SessionConversation extends React.Component {
- + { showRecordingView && (
)} @@ -517,8 +521,6 @@ export class SessionConversation extends React.Component { const { conversationKey } = this.state; const conversation = window.getConversationByKey(conversationKey); - console.log(`[settings] Conversation:`, conversation); - const ourPK = window.textsecure.storage.user.getNumber(); const members = conversation.get('members') || []; @@ -700,6 +702,14 @@ export class SessionConversation extends React.Component { this.setState({ isScrolledToBottom }); } + // Scroll button appears if you're more than 75vh scrolled up + console.log(`[scroll] MessageContainer: `, messageContainer); + console.log(`[scroll] scrollTop: `, messageContainer.scrollTop); + console.log(`[scroll] scrollHeight: `, messageContainer.scrollHeight); + console.log(`[scroll] clientHeight: `, messageContainer.clientHeight); + + const scrollButtonViewLimit = messageContainer.clientHeight; + // Fetch more messages when nearing the top of the message list const shouldFetchMoreMessages = messageContainer.scrollTop <= window.CONSTANTS.MESSAGE_CONTAINER_BUFFER_OFFSET_PX;