From d6d7efad36c1d6050d58e615a21f782215abfd67 Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Fri, 19 Mar 2021 11:49:51 +0100 Subject: [PATCH 01/11] fix and revamp new marker --- src/components/UnreadActionIndicator.js | 22 +++--------- src/pages/home/report/ReportActionItem.js | 6 ++++ src/pages/home/report/ReportActionsView.js | 39 +--------------------- src/styles/styles.js | 8 +++-- src/styles/variables.js | 2 ++ 5 files changed, 19 insertions(+), 58 deletions(-) diff --git a/src/components/UnreadActionIndicator.js b/src/components/UnreadActionIndicator.js index 83154a4cbf83..b58ffdbcf800 100644 --- a/src/components/UnreadActionIndicator.js +++ b/src/components/UnreadActionIndicator.js @@ -1,29 +1,17 @@ import React from 'react'; -import {Animated, View} from 'react-native'; -import PropTypes from 'prop-types'; +import {View} from 'react-native'; import styles from '../styles/styles'; import Text from './Text'; -const propTypes = { - // Animated opacity - // eslint-disable-next-line react/forbid-prop-types - animatedOpacity: PropTypes.object.isRequired, -}; - -const UnreadActionIndicator = props => ( - +const UnreadActionIndicator = () => ( + NEW - + ); -UnreadActionIndicator.propTypes = propTypes; UnreadActionIndicator.displayName = 'UnreadActionIndicator'; -export default UnreadActionIndicator; +export default UnreadActionIndicator; \ No newline at end of file diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 3525cd4a8770..985efb73f663 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -14,6 +14,7 @@ import PopoverWithMeasuredContent from '../../../components/PopoverWithMeasuredC import ReportActionItemSingle from './ReportActionItemSingle'; import ReportActionItemGrouped from './ReportActionItemGrouped'; import ReportActionContextMenu from './ReportActionContextMenu'; +import UnreadActionIndicator from '../../../components/UnreadActionIndicator'; const propTypes = { // The ID of the report this action is on. @@ -25,6 +26,9 @@ const propTypes = { // Should the comment have the appearance of being grouped with the previous comment? displayAsGroup: PropTypes.bool.isRequired, + // Should we display the new indicator on top of the comment? + displayNewIndicator: PropTypes.bool.isRequired, + /* --- Onyx Props --- */ // List of betas for the current user. betas: PropTypes.arrayOf(PropTypes.string), @@ -56,6 +60,7 @@ class ReportActionItem extends Component { shouldComponentUpdate(nextProps, nextState) { return this.state.isPopoverVisible !== nextState.isPopoverVisible || this.props.displayAsGroup !== nextProps.displayAsGroup + || this.props.displayNewIndicator !== nextProps.displayNewIndicator || !_.isEqual(this.props.action, nextProps.action); } @@ -107,6 +112,7 @@ class ReportActionItem extends Component { {hovered => ( + {this.props.displayNewIndicator && } {!this.props.displayAsGroup ? diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 4d626ebba79b..05228bb29411 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -11,7 +11,6 @@ import _ from 'underscore'; import lodashGet from 'lodash.get'; import {withOnyx} from 'react-native-onyx'; import Text from '../../../components/Text'; -import UnreadActionIndicator from '../../../components/UnreadActionIndicator'; import { fetchActions, updateLastReadActionID, @@ -71,14 +70,6 @@ class ReportActionsView extends React.Component { this.loadMoreChats = this.loadMoreChats.bind(this); this.sortedReportActions = []; this.timers = []; - this.unreadIndicatorOpacity = new Animated.Value(1); - - // Helper variable that keeps track of the unread action count before it updates to zero - this.unreadActionCount = 0; - - // Helper variable that prevents the unread indicator to show up for new messages - // received while the report is still active - this.shouldShowUnreadActionIndicator = true; this.state = { isLoadingMoreChats: false, @@ -155,31 +146,6 @@ class ReportActionsView extends React.Component { } } - /** - * Checks if the unreadActionIndicator should be shown. - * If it does, starts a timeout for the fading out animation and creates - * a flag to not show it again if the report is still open - */ - setUpUnreadActionIndicator() { - if (!this.shouldShowUnreadActionIndicator) { - return; - } - - this.unreadActionCount = this.props.report.unreadActionCount; - - if (this.unreadActionCount > 0) { - this.unreadIndicatorOpacity = new Animated.Value(1); - this.timers.push(setTimeout(() => { - Animated.timing(this.unreadIndicatorOpacity, { - toValue: 0, - useNativeDriver: false, - }).start(); - }, 3000)); - } - - this.shouldShowUnreadActionIndicator = false; - } - /** * Actions to run when the report has been updated * @param {Number} oldReportID @@ -335,15 +301,13 @@ class ReportActionsView extends React.Component { // are implemented on native and web/desktop which leads to // the unread indicator on native to render below the message instead of above it. - {this.unreadActionCount > 0 && index === this.unreadActionCount - 1 && ( - - )} 0} /> ); @@ -364,7 +328,6 @@ class ReportActionsView extends React.Component { ); } - this.setUpUnreadActionIndicator(); this.updateSortedReportActions(); return ( Date: Mon, 22 Mar 2021 16:21:27 +0100 Subject: [PATCH 02/11] keep the new marker visible --- src/components/UnreadActionIndicator.js | 2 +- src/pages/home/report/ReportActionItem.js | 2 +- src/pages/home/report/ReportActionsView.js | 37 +++++++++++++++------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/components/UnreadActionIndicator.js b/src/components/UnreadActionIndicator.js index b58ffdbcf800..d2ffcc232c2a 100644 --- a/src/components/UnreadActionIndicator.js +++ b/src/components/UnreadActionIndicator.js @@ -14,4 +14,4 @@ const UnreadActionIndicator = () => ( UnreadActionIndicator.displayName = 'UnreadActionIndicator'; -export default UnreadActionIndicator; \ No newline at end of file +export default UnreadActionIndicator; diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 985efb73f663..6726a2a7518e 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -60,7 +60,7 @@ class ReportActionItem extends Component { shouldComponentUpdate(nextProps, nextState) { return this.state.isPopoverVisible !== nextState.isPopoverVisible || this.props.displayAsGroup !== nextProps.displayAsGroup - || this.props.displayNewIndicator !== nextProps.displayNewIndicator + || (this.props.displayNewIndicator !== nextProps.displayNewIndicator) || !_.isEqual(this.props.action, nextProps.action); } diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 05228bb29411..e89eb4ce3e82 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -1,6 +1,5 @@ import React from 'react'; import { - Animated, View, Keyboard, AppState, @@ -69,7 +68,8 @@ class ReportActionsView extends React.Component { this.onVisibilityChange = this.onVisibilityChange.bind(this); this.loadMoreChats = this.loadMoreChats.bind(this); this.sortedReportActions = []; - this.timers = []; + this.unreadTimer = null; + this.newMessageMarkerPosition = -1; this.state = { isLoadingMoreChats: false, @@ -101,6 +101,16 @@ class ReportActionsView extends React.Component { } componentDidUpdate(prevProps) { + // When the last action changes, wait three seconds, then record the max action + // If the report is already open, record the max action immediately + if (Visibility.isVisible()) { + if (prevProps.reportID !== this.props.reportID) { + this.unreadTimer = setTimeout(this.recordMaxAction, 3000); + } else if (!this.unreadTimer) { + this.recordMaxAction(); + } + } + // We have switched to a new report if (prevProps.reportID !== this.props.reportID) { this.reset(prevProps.reportID); @@ -117,12 +127,6 @@ class ReportActionsView extends React.Component { if (lastAction && (lastAction.actorEmail === this.props.session.email)) { this.scrollToListBottom(); } - - // When the last action changes, wait three seconds, then record the max action - // This will make the unread indicator go away if you receive comments in the same chat you're looking at - if (Visibility.isVisible()) { - this.timers.push(setTimeout(this.recordMaxAction, 3000)); - } } } @@ -133,7 +137,10 @@ class ReportActionsView extends React.Component { AppState.removeEventListener('change', this.onVisibilityChange); - _.each(this.timers, timer => clearTimeout(timer)); + if (this.unreadTimer) { + clearTimeout(this.unreadTimer); + this.unreadTimer = null; + } unsubscribeFromReportChannel(this.props.reportID); } @@ -142,7 +149,7 @@ class ReportActionsView extends React.Component { */ onVisibilityChange() { if (Visibility.isVisible()) { - this.timers.push(setTimeout(this.recordMaxAction, 3000)); + this.unreadTimer = setTimeout(this.recordMaxAction, 3000); } } @@ -158,6 +165,7 @@ class ReportActionsView extends React.Component { // Fetch the new set of actions fetchActions(this.props.reportID); + this.newMessageMarkerPosition = -1; } /** @@ -229,6 +237,10 @@ class ReportActionsView extends React.Component { * action when scrolled */ recordMaxAction() { + if (this.unreadTimer) { + clearTimeout(this.unreadTimer); + this.unreadTimer = null; + } const reportActions = lodashGet(this.props, 'reportActions', {}); const maxVisibleSequenceNumber = _.chain(reportActions) @@ -307,7 +319,7 @@ class ReportActionsView extends React.Component { displayAsGroup={this.isConsecutiveActionMadeByPreviousActor(index)} onLayout={onLayout} needsLayoutCalculation={needsLayoutCalculation} - displayNewIndicator={this.props.report.unreadActionCount > 0} + displayNewIndicator={index === this.newMessageMarkerPosition - 1} /> ); @@ -328,6 +340,9 @@ class ReportActionsView extends React.Component { ); } + if (this.newMessageMarkerPosition < 0) { + this.newMessageMarkerPosition = this.props.report.unreadActionCount; + } this.updateSortedReportActions(); return ( Date: Mon, 22 Mar 2021 17:00:02 +0100 Subject: [PATCH 03/11] correctly place marker when new messages come in --- src/pages/home/report/ReportActionsView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index e89eb4ce3e82..d503c226433e 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -342,6 +342,8 @@ class ReportActionsView extends React.Component { if (this.newMessageMarkerPosition < 0) { this.newMessageMarkerPosition = this.props.report.unreadActionCount; + } else if (this.newMessageMarkerPosition > 0 && this.props.report.unreadActionCount > 0) { + this.newMessageMarkerPosition += this.props.report.unreadActionCount; } this.updateSortedReportActions(); return ( From 575ebe14345f9470024b7d0a76bf48afebb93156 Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Mon, 22 Mar 2021 17:37:21 +0100 Subject: [PATCH 04/11] fix merge master error --- src/styles/styles.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index ed28c7c2c95f..3454a11bf455 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -963,13 +963,6 @@ const styles = { borderColor: colors.transparent, }, - miniReportActionContextMenuWrapperStyle: { - ...positioning.tn4, - ...positioning.r4, - position: 'absolute', - zIndex: variables.zIndexTop, - }, - reportActionContextMenuText: { color: themeColors.heading, fontFamily: fontFamily.GTA_BOLD, From 6394e39b762baad75a6e1aa9294f745c2e7b85cd Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Tue, 23 Mar 2021 10:54:30 +0100 Subject: [PATCH 05/11] store the sequence instead of the actioncount --- src/pages/home/report/ReportActionsView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 112058a1d733..761a17589b73 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -319,7 +319,8 @@ class ReportActionsView extends React.Component { displayAsGroup={this.isConsecutiveActionMadeByPreviousActor(index)} onLayout={onLayout} needsLayoutCalculation={needsLayoutCalculation} - displayNewIndicator={index === this.newMessageMarkerPosition - 1} + displayNewIndicator={this.newMessageMarkerPosition > 0 + && item.action.sequenceNumber === this.newMessageMarkerPosition} /> ); @@ -341,10 +342,11 @@ class ReportActionsView extends React.Component { } if (this.newMessageMarkerPosition < 0) { - this.newMessageMarkerPosition = this.props.report.unreadActionCount; - } else if (this.newMessageMarkerPosition > 0 && this.props.report.unreadActionCount > 0) { - this.newMessageMarkerPosition += this.props.report.unreadActionCount; + this.newMessageMarkerPosition = this.props.report.unreadActionCount === 0 + ? this.props.report.unreadActionCount + : _.size(this.props.reportActions) - this.props.report.unreadActionCount; } + this.updateSortedReportActions(); return ( Date: Mon, 29 Mar 2021 12:58:41 +0200 Subject: [PATCH 06/11] refactor timer setting --- src/pages/home/report/ReportActionsView.js | 31 +++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index f995e76ce325..a72d7e8b89b7 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -67,6 +67,7 @@ class ReportActionsView extends React.Component { this.recordMaxAction = this.recordMaxAction.bind(this); this.onVisibilityChange = this.onVisibilityChange.bind(this); this.loadMoreChats = this.loadMoreChats.bind(this); + this.scheduleRecordMaxAction = this.scheduleRecordMaxAction.bind(this); this.sortedReportActions = []; this.unreadTimer = null; this.newMessageMarkerPosition = -1; @@ -105,9 +106,9 @@ class ReportActionsView extends React.Component { // If the report is already open, record the max action immediately if (Visibility.isVisible()) { if (prevProps.reportID !== this.props.reportID) { - this.unreadTimer = setTimeout(this.recordMaxAction, 3000); + this.scheduleRecordMaxAction(3000); } else if (!this.unreadTimer) { - this.recordMaxAction(); + this.scheduleRecordMaxAction(); } } @@ -149,10 +150,30 @@ class ReportActionsView extends React.Component { */ onVisibilityChange() { if (Visibility.isVisible()) { - this.unreadTimer = setTimeout(this.recordMaxAction, 3000); + this.scheduleRecordMaxAction(3000); } } + /** + * Sets the max action after a set delay + * + * @param {Number} delay - In miliseconds + */ + scheduleRecordMaxAction(delay = 0) { + // Always cancel the existing timer + if (this.unreadTimer) { + clearTimeout(this.unreadTimer); + this.unreadTimer = null; + } + + if (delay === 0) { + this.recordMaxAction(); + return; + } + + this.unreadTimer = setTimeout(this.recordMaxAction, delay); + } + /** * Actions to run when the report has been updated * @param {Number} oldReportID @@ -237,10 +258,6 @@ class ReportActionsView extends React.Component { * action when scrolled */ recordMaxAction() { - if (this.unreadTimer) { - clearTimeout(this.unreadTimer); - this.unreadTimer = null; - } const reportActions = lodashGet(this.props, 'reportActions', {}); const maxVisibleSequenceNumber = _.chain(reportActions) From f4b5d79d12ff59effdea8501a5b26ab140dbe47c Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Tue, 30 Mar 2021 13:17:39 +0200 Subject: [PATCH 07/11] Fix marker on Mobile --- src/styles/styles.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index ff340ab5e0fc..b4cc8c3e88d0 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1130,10 +1130,10 @@ const styles = { unreadIndicatorContainer: { position: 'absolute', - top: -5, + top: -10, left: 0, width: '100%', - height: 10, + height: 20, paddingHorizontal: 20, flexDirection: 'row', alignItems: 'center', From 5d1cc73afff0ecc1835e89a76cad259f3cec7acc Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Wed, 31 Mar 2021 10:52:24 +0200 Subject: [PATCH 08/11] remove log file --- ubuntu-xenial-16.04-cloudimg-console.log | 686 ----------------------- 1 file changed, 686 deletions(-) delete mode 100644 ubuntu-xenial-16.04-cloudimg-console.log diff --git a/ubuntu-xenial-16.04-cloudimg-console.log b/ubuntu-xenial-16.04-cloudimg-console.log deleted file mode 100644 index 94acebc60e8e..000000000000 --- a/ubuntu-xenial-16.04-cloudimg-console.log +++ /dev/null @@ -1,686 +0,0 @@ -[ 0.000000] Initializing cgroup subsys cpuset -[ 0.000000] Initializing cgroup subsys cpu -[ 0.000000] Initializing cgroup subsys cpuacct -[ 0.000000] Linux version 4.4.0-200-generic (buildd@lgw01-amd64-032) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) ) #232-Ubuntu SMP Wed Jan 13 10:18:39 UTC 2021 (Ubuntu 4.4.0-200.232-generic 4.4.244) -[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-200-generic root=UUID=1a0beaed-a559-4469-8ec4-88bb12be8081 ro console=tty1 console=ttyS0 -[ 0.000000] KERNEL supported cpus: -[ 0.000000] Intel GenuineIntel -[ 0.000000] AMD AuthenticAMD -[ 0.000000] Centaur CentaurHauls -[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 -[ 0.000000] x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers' -[ 0.000000] x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers' -[ 0.000000] x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers' -[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format. -[ 0.000000] e820: BIOS-provided physical RAM map: -[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable -[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved -[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved -[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000dffeffff] usable -[ 0.000000] BIOS-e820: [mem 0x00000000dfff0000-0x00000000dfffffff] ACPI data -[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved -[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved -[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved -[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011fffffff] usable -[ 0.000000] NX (Execute Disable) protection: active -[ 0.000000] SMBIOS 2.5 present. -[ 0.000000] Hypervisor detected: KVM -[ 0.000000] e820: last_pfn = 0x120000 max_arch_pfn = 0x400000000 -[ 0.000000] MTRR: Disabled -[ 0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too. -[ 0.000000] CPU MTRRs all blank - virtualized system. -[ 0.000000] x86/PAT: Configuration [0-7]: WB WT UC- UC WB WT UC- UC -[ 0.000000] e820: last_pfn = 0xdfff0 max_arch_pfn = 0x400000000 -[ 0.000000] found SMP MP-table at [mem 0x0009fff0-0x0009ffff] mapped at [ffff88000009fff0] -[ 0.000000] Scanning 1 areas for low memory corruption -[ 0.000000] RAMDISK: [mem 0x361c8000-0x370dbfff] -[ 0.000000] ACPI: Early table checksum verification disabled -[ 0.000000] ACPI: RSDP 0x00000000000E0000 000024 (v02 VBOX ) -[ 0.000000] ACPI: XSDT 0x00000000DFFF0030 00003C (v01 VBOX VBOXXSDT 00000001 ASL 00000061) -[ 0.000000] ACPI: FACP 0x00000000DFFF00F0 0000F4 (v04 VBOX VBOXFACP 00000001 ASL 00000061) -[ 0.000000] ACPI: DSDT 0x00000000DFFF0480 002325 (v02 VBOX VBOXBIOS 00000002 INTL 20120111) -[ 0.000000] ACPI: FACS 0x00000000DFFF0200 000040 -[ 0.000000] ACPI: FACS 0x00000000DFFF0200 000040 -[ 0.000000] ACPI: APIC 0x00000000DFFF0240 00006C (v02 VBOX VBOXAPIC 00000001 ASL 00000061) -[ 0.000000] ACPI: SSDT 0x00000000DFFF02B0 0001CC (v01 VBOX VBOXCPUT 00000002 INTL 20120111) -[ 0.000000] No NUMA configuration found -[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000011fffffff] -[ 0.000000] NODE_DATA(0) allocated [mem 0x11fff7000-0x11fffbfff] -[ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 -[ 0.000000] kvm-clock: cpu 0, msr 1:1ffef001, primary cpu clock -[ 0.000000] kvm-clock: using sched offset of 3593962192 cycles -[ 0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns -[ 0.000000] Zone ranges: -[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] -[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff] -[ 0.000000] Normal [mem 0x0000000100000000-0x000000011fffffff] -[ 0.000000] Device empty -[ 0.000000] Movable zone start for each node -[ 0.000000] Early memory node ranges -[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] -[ 0.000000] node 0: [mem 0x0000000000100000-0x00000000dffeffff] -[ 0.000000] node 0: [mem 0x0000000100000000-0x000000011fffffff] -[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000011fffffff] -[ 0.000000] ACPI: PM-Timer IO Port: 0x4008 -[ 0.000000] IOAPIC[0]: apic_id 4, version 32, address 0xfec00000, GSI 0-23 -[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) -[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) -[ 0.000000] Using ACPI (MADT) for SMP configuration information -[ 0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs -[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] -[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff] -[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff] -[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff] -[ 0.000000] PM: Registered nosave memory: [mem 0xdfff0000-0xdfffffff] -[ 0.000000] PM: Registered nosave memory: [mem 0xe0000000-0xfebfffff] -[ 0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff] -[ 0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfedfffff] -[ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff] -[ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xfffbffff] -[ 0.000000] PM: Registered nosave memory: [mem 0xfffc0000-0xffffffff] -[ 0.000000] e820: [mem 0xe0000000-0xfebfffff] available for PCI devices -[ 0.000000] Booting paravirtualized kernel on KVM -[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns -[ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:4 nr_node_ids:1 -[ 0.000000] PERCPU: Embedded 33 pages/cpu @ffff88011fc00000 s95640 r8192 d31336 u524288 -[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 1032056 -[ 0.000000] Policy zone: Normal -[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-200-generic root=UUID=1a0beaed-a559-4469-8ec4-88bb12be8081 ro console=tty1 console=ttyS0 -[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes) -[ 0.000000] Memory: 4027352K/4193848K available (8641K kernel code, 1337K rwdata, 4044K rodata, 1492K init, 1296K bss, 166496K reserved, 0K cma-reserved) -[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 -[ 0.000000] Kernel/User page tables isolation: enabled -[ 0.000000] Hierarchical RCU implementation. -[ 0.000000] Build-time adjustment of leaf fanout to 64. -[ 0.000000] RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4. -[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4 -[ 0.000000] NR_IRQS:33024 nr_irqs:456 16 -[ 0.000000] Console: colour VGA+ 80x25 -[ 0.000000] console [tty1] enabled -[ 0.000000] console [ttyS0] enabled -[ 0.000000] tsc: Detected 2208.000 MHz processor -[ 0.307990] Calibrating delay loop (skipped) preset value.. 4416.00 BogoMIPS (lpj=8832000) -[ 0.309876] pid_max: default: 32768 minimum: 301 -[ 0.310817] ACPI: Core revision 20150930 -[ 0.312339] ACPI: 2 ACPI AML tables successfully acquired and loaded -[ 0.313929] Security Framework initialized -[ 0.314783] Yama: becoming mindful. -[ 0.315574] AppArmor: AppArmor initialized -[ 0.317652] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes) -[ 0.321755] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes) -[ 0.323503] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes) -[ 0.324790] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes) -[ 0.327295] Initializing cgroup subsys io -[ 0.328170] Initializing cgroup subsys memory -[ 0.329072] Initializing cgroup subsys devices -[ 0.329983] Initializing cgroup subsys freezer -[ 0.330891] Initializing cgroup subsys net_cls -[ 0.331817] Initializing cgroup subsys perf_event -[ 0.332768] Initializing cgroup subsys net_prio -[ 0.333758] Initializing cgroup subsys hugetlb -[ 0.334718] Initializing cgroup subsys pids -[ 0.347395] mce: CPU supports 0 MCE banks -[ 0.348453] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8 -[ 0.349560] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4 -[ 0.350815] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization -[ 0.352585] Spectre V2 : Mitigation: Full generic retpoline -[ 0.354208] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch -[ 0.355930] Speculative Store Bypass: Vulnerable -[ 0.356867] SRBDS: Unknown: Dependent on hypervisor status -[ 0.358013] MDS: Mitigation: Clear CPU buffers -[ 0.361423] Freeing SMP alternatives memory: 36K -[ 0.367310] ftrace: allocating 32360 entries in 127 pages -[ 0.415304] smpboot: APIC(0) Converting physical 0 to logical package 0 -[ 0.416722] smpboot: Max logical packages: 1 -[ 0.417790] x2apic enabled -[ 0.418590] Switched APIC routing to physical x2apic. -[ 0.420494] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 -[ 0.529780] smpboot: CPU0: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (family: 0x6, model: 0x9e, stepping: 0xa) -[ 0.532770] Performance Events: unsupported p6 CPU model 158 no PMU driver, software events only. -[ 0.541524] KVM setup paravirtual spinlock -[ 0.543336] x86: Booting SMP configuration: -[ 0.544525] .... node #0, CPUs: #1 -[ 0.545521] kvm-clock: cpu 1, msr 1:1ffef041, secondary cpu clock -[ 0.558050] mce: CPU supports 0 MCE banks -[ 0.561300] #2 -[ 0.562001] kvm-clock: cpu 2, msr 1:1ffef081, secondary cpu clock -[ 0.575913] mce: CPU supports 0 MCE banks -[ 0.579213] #3 -[ 0.579861] kvm-clock: cpu 3, msr 1:1ffef0c1, secondary cpu clock -[ 0.594293] mce: CPU supports 0 MCE banks -[ 0.597500] x86: Booted up 1 node, 4 CPUs -[ 0.599037] smpboot: Total of 4 processors activated (17664.00 BogoMIPS) -[ 0.601110] devtmpfs: initialized -[ 0.605440] evm: security.selinux -[ 0.606644] evm: security.SMACK64 -[ 0.607524] evm: security.SMACK64EXEC -[ 0.608637] evm: security.SMACK64TRANSMUTE -[ 0.609570] evm: security.SMACK64MMAP -[ 0.610337] evm: security.ima -[ 0.610991] evm: security.capability -[ 0.612105] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns -[ 0.614798] futex hash table entries: 1024 (order: 4, 65536 bytes) -[ 0.616297] pinctrl core: initialized pinctrl subsystem -[ 0.617542] RTC time: 16:26:46, date: 03/09/21 -[ 0.619242] NET: Registered protocol family 16 -[ 0.629248] cpuidle: using governor ladder -[ 0.641491] cpuidle: using governor menu -[ 0.642842] PCCT header not found. -[ 0.644212] ACPI: bus type PCI registered -[ 0.645592] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 -[ 0.647315] PCI: Using configuration type 1 for base access -[ 0.663720] ACPI: Added _OSI(Module Device) -[ 0.665168] ACPI: Added _OSI(Processor Device) -[ 0.666397] ACPI: Added _OSI(3.0 _SCP Extensions) -[ 0.667876] ACPI: Added _OSI(Processor Aggregator Device) -[ 0.670000] ACPI: Executed 1 blocks of module-level executable AML code -[ 0.673421] ACPI: Interpreter enabled -[ 0.674643] ACPI: (supports S0 S5) -[ 0.675583] ACPI: Using IOAPIC for interrupt routing -[ 0.676698] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug -[ 0.682469] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) -[ 0.684492] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI] -[ 0.686193] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] -[ 0.688168] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. -[ 0.697923] PCI host bridge to bus 0000:00 -[ 0.698819] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window] -[ 0.700438] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window] -[ 0.701791] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window] -[ 0.703366] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xfdffffff window] -[ 0.704999] pci_bus 0000:00: root bus resource [bus 00-ff] -[ 0.708341] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] -[ 0.709802] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6] -[ 0.711080] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] -[ 0.712504] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376] -[ 0.746153] pci 0000:00:07.0: quirk: [io 0x4000-0x403f] claimed by PIIX4 ACPI -[ 0.747931] pci 0000:00:07.0: quirk: [io 0x4100-0x410f] claimed by PIIX4 SMB -[ 0.772680] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 9 10 *11) -[ 0.775017] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 9 *10 11) -[ 0.777433] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 *9 10 11) -[ 0.779417] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 9 10 *11) -[ 0.781205] ACPI: Enabled 2 GPEs in block 00 to 07 -[ 0.782624] vgaarb: setting as boot device: PCI:0000:00:02.0 -[ 0.784312] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none -[ 0.786342] vgaarb: loaded -[ 0.787294] vgaarb: bridge control possible 0000:00:02.0 -[ 0.788903] SCSI subsystem initialized -[ 0.790257] ACPI: bus type USB registered -[ 0.791236] usbcore: registered new interface driver usbfs -[ 0.792944] usbcore: registered new interface driver hub -[ 0.794343] usbcore: registered new device driver usb -[ 0.796084] PCI: Using ACPI for IRQ routing -[ 0.797521] NetLabel: Initializing -[ 0.798437] NetLabel: domain hash size = 128 -[ 0.799799] NetLabel: protocols = UNLABELED CIPSOv4 -[ 0.800945] NetLabel: unlabeled traffic allowed by default -[ 0.802239] amd_nb: Cannot enumerate AMD northbridges -[ 0.805026] clocksource: Switched to clocksource kvm-clock -[ 0.813116] AppArmor: AppArmor Filesystem Enabled -[ 0.814547] pnp: PnP ACPI init -[ 0.816846] pnp: PnP ACPI: found 3 devices -[ 0.829408] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns -[ 0.832031] NET: Registered protocol family 2 -[ 0.833687] TCP established hash table entries: 32768 (order: 6, 262144 bytes) -[ 0.836045] TCP bind hash table entries: 32768 (order: 7, 524288 bytes) -[ 0.839779] TCP: Hash tables configured (established 32768 bind 32768) -[ 0.842142] UDP hash table entries: 2048 (order: 4, 65536 bytes) -[ 0.844600] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes) -[ 0.846571] NET: Registered protocol family 1 -[ 0.847890] pci 0000:00:00.0: Limiting direct PCI/PCI transfers -[ 0.849297] pci 0000:00:01.0: Activating ISA DMA hang workarounds -[ 0.850911] Unpacking initramfs... -[ 1.102146] Freeing initrd memory: 15440K -[ 1.103668] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) -[ 1.105648] software IO TLB: mapped [mem 0xdbff0000-0xdfff0000] (64MB) -[ 1.107776] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1fd3b81b95f, max_idle_ns: 440795257325 ns -[ 1.110534] platform rtc_cmos: registered platform RTC device (no PNP device found) -[ 1.112431] Scanning for low memory corruption every 60 seconds -[ 1.114326] audit: initializing netlink subsys (disabled) -[ 1.115915] audit: type=2000 audit(1615307211.432:1): initialized -[ 1.117558] Initialise system trusted keyring -[ 1.119259] HugeTLB registered 2 MB page size, pre-allocated 0 pages -[ 1.122210] zbud: loaded -[ 1.123312] VFS: Disk quotas dquot_6.6.0 -[ 1.124421] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) -[ 1.126430] squashfs: version 4.0 (2009/01/31) Phillip Lougher -[ 1.128481] fuse init (API version 7.23) -[ 1.129645] Key type big_key registered -[ 1.130572] Allocating IMA MOK and blacklist keyrings. -[ 1.133697] Key type asymmetric registered -[ 1.134765] Asymmetric key parser 'x509' registered -[ 1.136596] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) -[ 1.138705] io scheduler noop registered -[ 1.139644] io scheduler deadline registered (default) -[ 1.140904] io scheduler cfq registered -[ 1.142101] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 -[ 1.143670] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 -[ 1.145528] ACPI: AC Adapter [AC] (on-line) -[ 1.146565] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 -[ 1.148468] ACPI: Power Button [PWRF] -[ 1.149640] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1 -[ 1.151783] ACPI: Sleep Button [SLPF] -[ 1.153416] GHES: HEST is not enabled! -[ 1.154622] ACPI: Battery Slot [BAT0] (battery present) -[ 1.156175] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled -[ 1.178568] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A -[ 1.184358] Linux agpgart interface v0.103 -[ 1.188300] loop: module loaded -[ 1.189703] scsi host0: ata_piix -[ 1.190730] scsi host1: ata_piix -[ 1.191753] ata1: PATA max UDMA/33 cmd 0x1f0 ctl 0x3f6 bmdma 0xd000 irq 14 -[ 1.193938] ata2: PATA max UDMA/33 cmd 0x170 ctl 0x376 bmdma 0xd008 irq 15 -[ 1.195706] libphy: Fixed MDIO Bus: probed -[ 1.197084] tun: Universal TUN/TAP device driver, 1.6 -[ 1.198210] tun: (C) 1999-2004 Max Krasnyansky -[ 1.199762] PPP generic driver version 2.4.2 -[ 1.201180] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver -[ 1.202978] ehci-pci: EHCI PCI platform driver -[ 1.204559] ehci-platform: EHCI generic platform driver -[ 1.205973] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver -[ 1.207341] ohci-pci: OHCI PCI platform driver -[ 1.208601] ohci-platform: OHCI generic platform driver -[ 1.209873] uhci_hcd: USB Universal Host Controller Interface driver -[ 1.211321] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12 -[ 1.213595] serio: i8042 KBD port at 0x60,0x64 irq 1 -[ 1.215034] serio: i8042 AUX port at 0x60,0x64 irq 12 -[ 1.216361] mousedev: PS/2 mouse device common for all mice -[ 1.218438] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2 -[ 1.221283] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 -[ 1.223014] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram -[ 1.224517] i2c /dev entries driver -[ 1.225627] device-mapper: uevent: version 1.0.3 -[ 1.227045] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com -[ 1.229224] ledtrig-cpu: registered to indicate activity on CPUs -[ 1.231037] NET: Registered protocol family 10 -[ 1.232190] NET: Registered protocol family 17 -[ 1.233559] Key type dns_resolver registered -[ 1.235746] registered taskstats version 1 -[ 1.236903] Loading compiled-in X.509 certificates -[ 1.238426] Loaded X.509 cert 'Build time autogenerated kernel key: d37465c24ef3fae6c7088e8c56d8ac7755b77486' -[ 1.240424] zswap: loaded using pool lzo/zbud -[ 1.243150] Key type trusted registered -[ 1.247162] Key type encrypted registered -[ 1.248311] AppArmor: AppArmor sha1 policy hashing enabled -[ 1.249544] ima: No TPM chip found, activating TPM-bypass! -[ 1.250918] ima: Allocated hash algorithm: sha1 -[ 1.252024] evm: HMAC attrs: 0x1 -[ 1.253887] Magic number: 13:727:438 -[ 1.255188] rtc_cmos rtc_cmos: setting system clock to 2021-03-09 16:26:46 UTC (1615307206) -[ 1.257206] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found -[ 1.258976] EDD information not available. -[ 1.374996] Freeing unused kernel memory: 1492K -[ 1.376510] Write protecting the kernel read-only data: 14336k -[ 1.378339] Freeing unused kernel memory: 1588K -[ 1.379579] Freeing unused kernel memory: 52K -Loading, please wait... -starting version 229 -[ 1.392629] random: systemd-udevd: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.393308] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.393332] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.399612] random: systemd-udevd: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400115] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400169] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400424] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400478] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400529] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.400578] random: udevadm: uninitialized urandom read (16 bytes read, 3 bits of entropy available) -[ 1.444811] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI -[ 1.446841] e1000: Copyright (c) 1999-2006 Intel Corporation. -[ 1.448457] Fusion MPT base driver 3.04.20 -[ 1.449693] Copyright (c) 1999-2008 LSI Corporation -[ 1.455655] Fusion MPT SPI Host driver 3.04.20 -[ 1.462513] AVX2 version of gcm_enc/dec engaged. -[ 1.464252] AES CTR mode by8 optimization enabled -[ 1.673676] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4 -[ 2.423035] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 02:46:62:72:a1:53 -[ 2.424860] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection -[ 3.129905] e1000 0000:00:08.0 eth1: (PCI:33MHz:32-bit) 08:00:27:7c:05:52 -[ 3.131446] e1000 0000:00:08.0 eth1: Intel(R) PRO/1000 Network Connection -[ 3.141771] e1000 0000:00:03.0 enp0s3: renamed from eth0 -[ 3.143260] mptbase: ioc0: Initiating bringup -[ 3.155195] e1000 0000:00:08.0 enp0s8: renamed from eth1 -[ 3.432965] ioc0: LSI53C1030 A0: Capabilities={Initiator} -[ 4.563114] scsi host2: ioc0: LSI53C1030 A0, FwRev=00000000h, Ports=1, MaxQ=256, IRQ=20 -[ 5.593896] scsi 2:0:0:0: Direct-Access VBOX HARDDISK 1.0 PQ: 0 ANSI: 5 -[ 5.596796] scsi target2:0:0: Beginning Domain Validation -[ 5.601516] scsi target2:0:0: Domain Validation skipping write tests -[ 5.603856] scsi target2:0:0: Ending Domain Validation -[ 5.606114] scsi target2:0:0: asynchronous -[ 5.608890] scsi 2:0:1:0: Direct-Access VBOX HARDDISK 1.0 PQ: 0 ANSI: 5 -[ 5.612054] scsi target2:0:1: Beginning Domain Validation -[ 5.616876] scsi target2:0:1: Domain Validation skipping write tests -[ 5.619195] scsi target2:0:1: Ending Domain Validation -[ 5.621199] scsi target2:0:1: asynchronous -[ 5.632835] sd 2:0:0:0: Attached scsi generic sg0 type 0 -[ 5.633114] sd 2:0:0:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB) -[ 5.633609] sd 2:0:0:0: [sda] Write Protect is off -[ 5.633918] sd 2:0:0:0: [sda] Incomplete mode parameter data -[ 5.633919] sd 2:0:0:0: [sda] Assuming drive cache: write through -[ 5.636226] sda: sda1 -[ 5.637799] sd 2:0:0:0: [sda] Attached SCSI disk -[ 5.666845] sd 2:0:1:0: Attached scsi generic sg1 type 0 -[ 5.667215] sd 2:0:1:0: [sdb] 20480 512-byte logical blocks: (10.5 MB/10.0 MiB) -[ 5.667724] sd 2:0:1:0: [sdb] Write Protect is off -[ 5.668151] sd 2:0:1:0: [sdb] Incomplete mode parameter data -[ 5.668153] sd 2:0:1:0: [sdb] Assuming drive cache: write through -[ 5.673699] sd 2:0:1:0: [sdb] Attached SCSI disk -Begin: Loading essential drivers ... [ 7.410687] md: linear personality registered for level -1 -[ 7.415490] md: multipath personality registered for level -4 -[ 7.420667] md: raid0 personality registered for level 0 -[ 7.428536] md: raid1 personality registered for level 1 -[ 7.502486] raid6: sse2x1 gen() 7308 MB/s -[ 7.573504] raid6: sse2x1 xor() 7229 MB/s -[ 7.641632] raid6: sse2x2 gen() 12093 MB/s -[ 7.709127] raid6: sse2x2 xor() 8753 MB/s -[ 7.777191] raid6: sse2x4 gen() 13805 MB/s -[ 7.845450] raid6: sse2x4 xor() 10732 MB/s -[ 7.913209] raid6: avx2x1 gen() 22534 MB/s -[ 7.981373] raid6: avx2x2 gen() 23713 MB/s -[ 8.049124] raid6: avx2x4 gen() 22490 MB/s -[ 8.050588] raid6: using algorithm avx2x2 gen() 23713 MB/s -[ 8.052780] raid6: using avx2x2 recovery algorithm -[ 8.056869] xor: automatically using best checksumming function: -[ 8.097062] avx : 18271.000 MB/sec -[ 8.099894] async_tx: api initialized (async) -[ 8.131286] md: raid6 personality registered for level 6 -[ 8.134229] md: raid5 personality registered for level 5 -[ 8.136416] md: raid4 personality registered for level 4 -[ 8.154543] md: raid10 personality registered for level 10 -done. -Begin: Running /scripts/init-premount ... done. -Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. -Begin: Running /scripts/local-premount ... [ 8.209038] Btrfs loaded -Scanning for Btrfs filesystems -done. -Warning: fsck not present, so skipping root file system -[ 8.250868] EXT4-fs (sda1): INFO: recovery required on readonly filesystem -[ 8.253742] EXT4-fs (sda1): write access will be enabled during recovery -[ 8.279625] EXT4-fs (sda1): orphan cleanup on readonly fs -[ 8.282435] EXT4-fs (sda1): 6 orphan inodes deleted -[ 8.283859] EXT4-fs (sda1): recovery complete -[ 8.285783] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) -done. -Begin: Running /scripts/local-bottom ... done. -Begin: Running /scripts/init-bottom ... done. -[ 8.387601] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN) -[ 8.391267] systemd[1]: Detected virtualization oracle. -[ 8.392340] systemd[1]: Detected architecture x86-64. - -Welcome to Ubuntu 16.04.6 LTS! - -[ 8.396602] systemd[1]: Set hostname to . -[ 8.710555] systemd[1]: Started Forward Password Requests to Wall Directory Watch. -[ OK ] Started Forward Password Requests to Wall Directory Watch. -[ 8.715698] systemd[1]: Listening on LVM2 metadata daemon socket. -[ OK ] Listening on LVM2 metadata daemon socket. -[ 8.720457] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. -[ OK ] Set up automount Arbitrary Executab...ats File System Automount Point. -[ 8.725852] systemd[1]: Reached target Swap. -[ OK ] Reached target Swap. -[ 8.728427] systemd[1]: Reached target System Time Synchronized. -[ OK ] Reached target System Time Synchronized. -[ 8.732318] systemd[1]: Listening on Journal Audit Socket. -[ OK ] Listening on Journal Audit Socket. -[ 8.736138] systemd[1]: Started Trigger resolvconf update for networkd DNS. -[ OK ] Started Trigger resolvconf update for networkd DNS. -[ 8.739772] systemd[1]: Reached target Encrypted Volumes. -[ OK ] Reached target Encrypted Volumes. -[ 8.745845] systemd[1]: Listening on Syslog Socket. -[ OK ] Listening on Syslog Socket. -[ 8.749338] systemd[1]: Listening on LVM2 poll daemon socket. -[ OK ] Listening on LVM2 poll daemon socket. -[ 9.107083] systemd[1]: Reached target User and Group Name Lookups. -[ OK ] Reached target User and Group Name Lookups. -[ 9.110250] systemd[1]: Listening on udev Kernel Socket. -[ OK ] Listening on udev Kernel Socket. -[ 9.112700] systemd[1]: Listening on udev Control Socket. -[ OK ] Listening on udev Control Socket. -[ 9.114919] systemd[1]: Listening on Journal Socket. -[ OK ] Listening on Journal Socket. -[ 9.117120] systemd[1]: Created slice System Slice. -[ OK ] Created slice System Slice. -[ 9.321142] systemd[1]: Starting Nameserver information manager... - Starting Nameserver information manager... -[ 9.325230] systemd[1]: Starting Uncomplicated firewall... - Starting Uncomplicated firewall... -[ 9.329990] systemd[1]: Mounting POSIX Message Queue File System... - Mounting POSIX Message Queue File System... -[ 9.334794] systemd[1]: Starting Remount Root and Kernel File Systems... - Starting Remount Root and Kernel File Systems... -[ 9.340822] systemd[1]: Starting Create list of required static device nodes for the current kernel... -[ 9.341133] EXT4-fs (sda1): re-mounted. Opts: (null) - Starting Create list of required st... nodes for the current kernel... -[ 9.349328] systemd[1]: Mounting Huge Pages File System... - Mounting Huge Pages File System... -[ 9.354449] systemd[1]: Starting Set console keymap... - Starting Set console keymap... -[ 9.358628] systemd[1]: Mounting RPC Pipe File System... - Mounting RPC Pipe File System... -[ 9.362781] systemd[1]: Created slice system-serial\x2dgetty.slice. -[ OK ] Created slice system-serial\x2dgetty.slice. -[ 9.386933] RPC: Registered named UNIX socket transport module. -[ 9.393313] RPC: Registered udp transport module. -[ 9.410320] RPC: Registered tcp transport module. -[ 9.419090] RPC: Registered tcp NFSv4.1 backchannel transport module. -[ 9.429462] systemd[1]: Mounting Debug File System... - Mounting Debug File System... -[ 9.438094] systemd[1]: Starting Load Kernel Modules... - Starting Load Kernel Modules... -[ 9.442035] systemd[1]: Created slice User and Session Slice. -[ 9.443198] random: nonblocking pool is initialized -[ OK ] Created slice User and Session Slice. -[ 9.448302] systemd[1]: Reached target Slices. -[ 9.450262] Loading iSCSI transport class v2.0-870. -[ OK ] Reached target Slices. -[ 9.452812] systemd[1]: Listening on Device-mapper event daemon FIFOs. -[ OK ] Listening on Device-mapper event daemon FIFOs. -[ 9.458121] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling... - Starting Monitoring of LVM2 mirrors... dmeventd or progress polling... -[ 9.465914] iscsi: registered transport (tcp) -[ 9.467122] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe. -[ OK ] Listening on /dev/initctl Compatibility Named Pipe. -[ 9.471510] systemd[1]: Listening on Journal Socket (/dev/log). -[ OK ] Listening on Journal Socket (/dev/log). -[ 9.475699] systemd[1]: Starting Journal Service... - Starting Journal Service... -[ 9.480204] systemd[1]: Mounted RPC Pipe File System. -[ OK ] Mounted RPC Pipe File System. -[ 9.483511] systemd[1]: Mounted Debug File System. -[ OK ] Mounted Debug File System. -[ 9.488803] systemd[1]: Mounted POSIX Message Queue File System. -[ OK ] Mounted POSIX Message Queue File System. -[ 9.577058] systemd[1]: Mounted Huge Pages File System. -[ OK ] Mounted Huge Pages File System. -[ 9.595386] iscsi: registered transport (iser) -[ 9.606142] systemd[1]: Started Uncomplicated firewall. -[ OK ] Started Uncomplicated firewall. -[ 9.614443] systemd[1]: Started Remount Root and Kernel File Systems. -[ OK ] Started Remount Root and Kernel File Systems. -[ 9.618976] systemd[1]: Started Create list of required static device nodes for the current kernel. -[ OK ] Started Create list of required sta...ce nodes for the current kernel. -[ 9.624349] systemd[1]: Started Set console keymap. -[ OK ] Started Set console keymap. -[ 9.627565] systemd[1]: Started Load Kernel Modules. -[ OK ] Started Load Kernel Modules. -[ 9.645792] systemd[1]: Started Nameserver information manager. -[ OK ] Started Nameserver information manager. -[ 9.654887] systemd[1]: Started Journal Service. -[ OK ] Started Journal Service. -[ OK ] Started LVM2 metadata daemon. - Starting Apply Kernel Variables... - Mounting FUSE Control File System... - Starting Create Static Device Nodes in /dev... - Starting Load/Save Random Seed... - Starting Flush Journal to Persistent Storage... - Starting udev Coldplug all Devices... -[ OK ] Mounted FUSE Control File System. -[ OK ] Started Apply Kernel Variables. -[ OK ] Started Create Static Device Nodes in /dev. -[ OK ] Started Load/Save Random Seed. - Starting udev Kernel Device Manager... -[ OK ] Started Flush Journal to Persistent Storage. -[ OK ] Started udev Coldplug all Devices. -[ OK ] Started udev Kernel Device Manager. -[ OK ] Started Dispatch Password Requests to Console Directory Watch. -[ OK ] Started Monitoring of LVM2 mirrors,...ng dmeventd or progress polling. -[ OK ] Found device /dev/ttyS0. -[ OK ] Reached target Local File Systems (Pre). -[ OK ] Reached target Local File Systems. - Starting LSB: AppArmor initialization... - Starting Set console font and keymap... - Starting Create Volatile Files and Directories... - Starting Tell Plymouth To Write Out Runtime Data... - Starting Initial cloud-init job (pre-networking)... - Starting Preprocess NFS configuration... -[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. -[ OK ] Started Tell Plymouth To Write Out Runtime Data. -[ OK ] Started Create Volatile Files and Directories. -[ OK ] Started Preprocess NFS configuration. -[ OK ] Reached target NFS client services. - Starting Update UTMP about System Boot/Shutdown... -[ OK ] Started LSB: AppArmor initialization. -[ OK ] Found device 82540EM Gigabit Ethern...r (PRO/1000 MT Desktop Adapter). -[ OK ] Found device 82540EM Gigabit Ethern...r (PRO/1000 MT Desktop Adapter). - Starting Load AppArmor profiles managed internally by snapd... -[ OK ] Started Update UTMP about System Boot/Shutdown. -[ OK ] Started Load AppArmor profiles managed internally by snapd. -[ 10.610297] cloud-init[572]: Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 running 'init-local' at Tue, 09 Mar 2021 16:26:56 +0000. Up 10.43 seconds. -[ OK ] Started Set console font and keymap. -[ OK ] Created slice system-getty.slice. -[ OK ] Started Initial cloud-init job (pre-networking). -[ OK ] Reached target Network (Pre). - Starting Raise network interfaces... -[ OK ] Started ifup for enp0s8. -[ OK ] Started ifup for enp0s3. -[ OK ] Started Raise network interfaces. -[ OK ] Reached target Network. - Starting Initial cloud-init job (metadata service crawler)... -[ 11.339424] cloud-init[1119]: Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 running 'init' at Tue, 09 Mar 2021 16:26:56 +0000. Up 11.17 seconds. -[ 11.341879] cloud-init[1119]: ci-info: ++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++ -[ 11.344034] cloud-init[1119]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ -[ 11.346217] cloud-init[1119]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | -[ 11.348433] cloud-init[1119]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ -[ 11.356647] cloud-init[1119]: ci-info: | enp0s3 | True | 10.0.2.15 | 255.255.255.0 | global | 02:46:62:72:a1:53 | -[ 11.364325] cloud-init[1119]: ci-info: | enp0s3 | True | fe80::46:62ff:fe72:a153/64 | . | link | 02:46:62:72:a1:53 | -[ 11.372466] [cloud-init OK [1119]: ] ci-info: | enp0s8 | True | 10.2.2.2 | 255.255.255.0 | global | 08:00:27:7c:05:52 |Started Initial cloud-init job (metadata service crawler). - -[ OK ] Reached target Cloud-config availability. -[ OK ] Reached target Network is Online. -[ 11.374004] cloud-init[1119]: ci-info: | enp0s8 | True | fe80::a00:27ff:fe7c:552/64 | . | link | 08:00:27:7c:05:52 | -[ 11.387747] cloud-init[1119]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . | -[ 11.389538] cloud-init[1119]: ci-info: | lo | True | ::1/128 | . | host | . | -[ 11.391554] cloud-init[1119]: ci-info: +--------+------+----------------------------+---------------+--------+-------------------+ -[ 11.393581] cloud-init[1119]: ci-info: +++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++ -[ 11.395353] cloud-init[1119]: ci-info: +-------+-------------+----------+---------------+-----------+-------+ -[ 11.396981] cloud-init[1119]: ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags | -[ 11.398796] cloud-init[1119]: ci-info: +-------+-------------+----------+---------------+-----------+-------+ -[ 11.400630] cloud-init[1119]: ci-info: | 0 | 0.0.0.0 | 10.0.2.2 | 0.0.0.0 | enp0s3 | UG | -[ 11.402403] cloud-init[1119]: ci-info: | 1 | 10.0.2.0 | 0.0.0.0 | 255.255.255.0 | enp0s3 | U | -[ 11.412507] Starting iSCSI initiator daemon (iscsid)... -[ OK ] Reached target System Initialization. -[ OK ] Listening on D-Bus System Message Bus Socket. -cloud-init[1119]: ci-info: | 2 | 10.2.2.0 | 0.0.0.0 | 255.255.255.0 | enp0s8 | U | -[ 11.416299] Starting LXD - unix socket. - Starting Socket activation for snappy daemon. -[ OK ] Listening on RPCbind Server Activation Socket. - Starting RPC bind portmap service... -cloud-init[1119]: ci-info: +-------+-------------+----------+---------------+-----------+-------+ -[ 11.420309] cloud-init[1119]: [ OK ] Started ACPI Events Check. -[ OK ] Reached target Paths. -[ OK ] Started Daily Cleanup of Temporary Directories. -[ OK ] Listening on ACPID Listen Socket. -ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ -[ 11.424506] [ OK ] Started Clean PHP session files every 30 mins. -[ OK ] Started Daily apt download activities. -[ OK ] Started Daily apt upgrade and clean activities. -[ OK ] Reached target Timers. -[ OK ] Listening on UUID daemon activation socket. -[ OK ] Listening on LXD - unix socket. -[ OK ] Listening on Socket activation for snappy daemon. -[ OK ] Reached target Sockets. -[ OK ] Reached target Basic System. -cloud-init[1119]: ci-info: +-------+-------------+---------+-----------+-------+ -[ 11.432392] cloud-initStarting /etc/rc.local Compatibility...[1119]: -ci-info: | Route | Destination | Gateway | Interface | Flags | -[ 11.434641] cloud-init[1119]: ci-info: +-------+-------------+---------+-----------+-------+ -[ 11.436442] cloud-init[1119]: ci-info: | 0 | fe80::/64 | :: | enp0s8 | U | - Starting LSB: Record successful boot for GRUB... -[ 11.441651] cloud-init[1119]: ci-info: | 1 | fe80::/64 | :: | enp0s3 | U | -[ 11.444138] cloud-init[1119]: ci-info: | 4 | ff00::/8 | :: | enp0s8 | U | -[ 11.446447] [cloud-init OK [1119]: ] ci-info: | 5 | ff00::/8 | :: | enp0s3 | U |Started Regular background program processing daemon. - -[ 11.446649] cloud-init[1119]: ci-info: +-------+-------------+---------+-----------+-------+ - Starting System Logging Service... - Starting LXD - container startup/shutdown... - Starting Accounts Service... -[ OK ] Started ACPI event daemon. -[ OK ] Started ClamAV virus database updater. - Starting Login Service... - Starting Clam AntiVirus userspace daemon... -[ OK ] Started D-Bus System Message Bus. - Starting LSB: MD monitoring daemon... - Starting Virtualbox guest utils... -[ OK ] Started FUSE filesystem for LXC. -[ OK ] Started Deferred execution scheduler. - Starting The PHP 7.4 FastCGI Process Manager... - Starting OpenBSD Secure Shell server... - Starting MySQL Community Server... - Starting Snap Daemon... -[ OK ] Started RPC bind portmap service. -[ OK ] Started System Logging Service. -[ OK ] Started iSCSI initiator daemon (iscsid). -[ OK ] Started /etc/rc.local Compatibility. -[ OK ] Started Clam AntiVirus userspace daemon. -[ OK ] Started OpenBSD Secure Shell server. -[ OK ] Started Login Service. -[ OK ] Started Unattended Upgrades Shutdown. - Starting Authenticate and Authorize Users to Run Privileged Tasks... - Starting Login to default iSCSI targets... -[ OK ] Reached target RPC Port Mapper. -[ OK ] Started LSB: Record successful boot for GRUB. -[ OK ] Started LSB: MD monitoring daemon. -[ OK ] Started Authenticate and Authorize Users to Run Privileged Tasks. -[ OK ] Started Login to default iSCSI targets. -[ OK ] Reached target Remote File Systems (Pre). -[ OK ] Reached target Remote File Systems. - Starting nginx - high performance web server... - Starting LSB: daemon to balance interrupts for SMP systems... - Starting LSB: automatic crash report generation... - Starting LSB: Controls chronyd NTP time daemon... - Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"... - Starting Permit User Sessions... -[ OK ] Started LXD - container startup/shutdown. -[ OK ] Started Accounts Service. -[ OK ] Started Permit User Sessions. -[FAILED] Failed to start nginx - high performance web server. -See 'systemctl status nginx.service' for details. - Starting Terminate Plymouth Boot Screen... - Starting Hold until boot process finishes up... -[ OK ] Started Hold until boot process finishes up. -[ OK ] Started Getty on tty1. - Starting Set console scheme... -[ OK ] Started Serial Getty on ttyS0. -[ OK ] Reached target Login Prompts. -[ OK ] Started Virtualbox guest utils. -[ OK ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand". -[ OK ] Started Terminate Plymouth Boot Screen. -[ OK ] Started LSB: daemon to balance interrupts for SMP systems. -[ OK ] Started Set console scheme. -[ OK ] Started LSB: automatic crash report generation. -[ OK ] Started Snap Daemon. - Starting Wait until snapd is fully seeded... -[ OK ] Started Wait until snapd is fully seeded. - Starting Apply the settings specified in cloud-config... -[ OK ] Started The PHP 7.4 FastCGI Process Manager. -[ 12.500424] cloud-init[1481]: Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 running 'modules:config' at Tue, 09 Mar 2021 16:26:59 +0000. Up 12.41 seconds. -[ OK ] Started Apply the settings specified in cloud-config. -[ OK ] Started MySQL Community Server. -[ OK ] Created slice User Slice of vagrant. - Starting User Manager for UID 1000... -[ OK ] Started Session 1 of user vagrant. -[ OK ] Started User Manager for UID 1000. - -Ubuntu 16.04.6 LTS expensidev ttyS0 - -expensidev login: [ 21.166247] cloud-init[4342]: Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 running 'modules:final' at Tue, 09 Mar 2021 16:27:08 +0000. Up 21.06 seconds. -[ 21.166558] cloud-init[4342]: Cloud-init v. 19.1-1-gbaa47854-0ubuntu1~16.04.1 finished at Tue, 09 Mar 2021 16:27:08 +0000. Datasource DataSourceNoCloud [seed=/dev/sdb][dsmode=net]. Up 21.16 seconds From 928a2b8018564286769fc7c2125856552040c4e3 Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Wed, 31 Mar 2021 13:01:28 +0200 Subject: [PATCH 09/11] add conditions --- src/pages/home/report/ReportActionsView.js | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index a72d7e8b89b7..815988231f2f 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -67,7 +67,7 @@ class ReportActionsView extends React.Component { this.recordMaxAction = this.recordMaxAction.bind(this); this.onVisibilityChange = this.onVisibilityChange.bind(this); this.loadMoreChats = this.loadMoreChats.bind(this); - this.scheduleRecordMaxAction = this.scheduleRecordMaxAction.bind(this); + this.scheduledRecordMaxAction = this.scheduledRecordMaxAction.bind(this); this.sortedReportActions = []; this.unreadTimer = null; this.newMessageMarkerPosition = -1; @@ -103,12 +103,9 @@ class ReportActionsView extends React.Component { componentDidUpdate(prevProps) { // When the last action changes, wait three seconds, then record the max action - // If the report is already open, record the max action immediately if (Visibility.isVisible()) { if (prevProps.reportID !== this.props.reportID) { - this.scheduleRecordMaxAction(3000); - } else if (!this.unreadTimer) { - this.scheduleRecordMaxAction(); + this.unreadTimer = setTimeout(this.scheduledRecordMaxAction, 3000); } } @@ -128,6 +125,11 @@ class ReportActionsView extends React.Component { if (lastAction && (lastAction.actorEmail === this.props.session.email)) { this.scrollToListBottom(); } + + // If we are adding a new action while the report is open, record the max action immediately + if (Visibility.isVisible() && prevProps.reportID === this.props.reportID && !this.unreadTimer) { + this.scheduledRecordMaxAction(); + } } } @@ -150,28 +152,21 @@ class ReportActionsView extends React.Component { */ onVisibilityChange() { if (Visibility.isVisible()) { - this.scheduleRecordMaxAction(3000); + this.unreadTimer = setTimeout(this.scheduledRecordMaxAction, 3000); } } /** - * Sets the max action after a set delay - * - * @param {Number} delay - In miliseconds + * Helper function to clean up the timer before setting the max action */ - scheduleRecordMaxAction(delay = 0) { + scheduledRecordMaxAction() { // Always cancel the existing timer if (this.unreadTimer) { clearTimeout(this.unreadTimer); this.unreadTimer = null; } - if (delay === 0) { - this.recordMaxAction(); - return; - } - - this.unreadTimer = setTimeout(this.recordMaxAction, delay); + this.recordMaxAction(); } /** From 0188cb95ad6163a01e93de6deeb6a3e79e2b5833 Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Thu, 1 Apr 2021 13:05:59 +0200 Subject: [PATCH 10/11] Move some code around --- src/pages/home/report/ReportActionsView.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 815988231f2f..702cbbc83d9f 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -102,12 +102,6 @@ class ReportActionsView extends React.Component { } componentDidUpdate(prevProps) { - // When the last action changes, wait three seconds, then record the max action - if (Visibility.isVisible()) { - if (prevProps.reportID !== this.props.reportID) { - this.unreadTimer = setTimeout(this.scheduledRecordMaxAction, 3000); - } - } // We have switched to a new report if (prevProps.reportID !== this.props.reportID) { @@ -126,8 +120,8 @@ class ReportActionsView extends React.Component { this.scrollToListBottom(); } - // If we are adding a new action while the report is open, record the max action immediately - if (Visibility.isVisible() && prevProps.reportID === this.props.reportID && !this.unreadTimer) { + // If we are adding a new action while the chat is open, record the max action immediately + if (!this.unreadTimer && Visibility.isVisible()) { this.scheduledRecordMaxAction(); } } @@ -157,7 +151,7 @@ class ReportActionsView extends React.Component { } /** - * Helper function to clean up the timer before setting the max action + * Sets the max action after a set delay */ scheduledRecordMaxAction() { // Always cancel the existing timer @@ -182,6 +176,11 @@ class ReportActionsView extends React.Component { // Fetch the new set of actions fetchActions(this.props.reportID); this.newMessageMarkerPosition = -1; + + // Wait three seconds, then record the max action + if (Visibility.isVisible()) { + this.unreadTimer = setTimeout(this.scheduledRecordMaxAction, 3000); + } } /** From 4e6a172a92a01d7c06d82752d6b333bb3f52d27d Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Thu, 1 Apr 2021 13:22:03 +0200 Subject: [PATCH 11/11] style --- src/pages/home/report/ReportActionsView.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 702cbbc83d9f..0c8f85cfadf8 100644 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -102,7 +102,6 @@ class ReportActionsView extends React.Component { } componentDidUpdate(prevProps) { - // We have switched to a new report if (prevProps.reportID !== this.props.reportID) { this.reset(prevProps.reportID);