diff --git a/android/app/build.gradle b/android/app/build.gradle
index e135d44eb834..2b6a41d6e350 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001043202
- versionName "1.4.32-2"
+ versionCode 1001043203
+ versionName "1.4.32-3"
}
flavorDimensions "default"
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index c636ced8e7f9..20a9d5a8a237 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -40,7 +40,7 @@
CFBundleVersion
- 1.4.32.2
+ 1.4.32.3
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index ef1ef0d998d5..5ec1e69470c4 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.4.32.2
+ 1.4.32.3
diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist
index 16439b1d24d9..33db138aced7 100644
--- a/ios/NotificationServiceExtension/Info.plist
+++ b/ios/NotificationServiceExtension/Info.plist
@@ -5,7 +5,7 @@
CFBundleShortVersionString
1.4.32
CFBundleVersion
- 1.4.32.2
+ 1.4.32.3
NSExtension
NSExtensionPointIdentifier
diff --git a/package-lock.json b/package-lock.json
index 543a1366f8d6..c1d0e71a5e1c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "new.expensify",
- "version": "1.4.32-2",
+ "version": "1.4.32-3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "new.expensify",
- "version": "1.4.32-2",
+ "version": "1.4.32-3",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 8ceac3912660..2b850ea3488b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.4.32-2",
+ "version": "1.4.32-3",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts
index 36ac445a78d4..228b88d194ba 100644
--- a/src/libs/actions/Report.ts
+++ b/src/libs/actions/Report.ts
@@ -934,7 +934,7 @@ function expandURLPreview(reportID: string, reportActionID: string) {
}
/** Marks the new report actions as read */
-function readNewestAction(reportID: string, shouldEmitEvent = true) {
+function readNewestAction(reportID: string) {
const lastReadTime = DateUtils.getDBTime();
const optimisticData: OnyxUpdate[] = [
@@ -958,11 +958,6 @@ function readNewestAction(reportID: string, shouldEmitEvent = true) {
};
API.write('ReadNewestAction', parameters, {optimisticData});
-
- if (!shouldEmitEvent) {
- return;
- }
-
DeviceEventEmitter.emit(`readNewestAction_${reportID}`, lastReadTime);
}
diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js
index ce8dcb10ef5f..8d79e7af8dd4 100644
--- a/src/pages/home/report/ReportActionsList.js
+++ b/src/pages/home/report/ReportActionsList.js
@@ -143,7 +143,6 @@ function ReportActionsList({
const route = useRoute();
const opacity = useSharedValue(0);
const userActiveSince = useRef(null);
- const userInactiveSince = useRef(null);
const markerInit = () => {
if (!cacheUnreadMarkers.has(report.reportID)) {
@@ -388,7 +387,7 @@ function ReportActionsList({
[currentUnreadMarker, sortedVisibleReportActions, report.reportID, messageManuallyMarkedUnread],
);
- const calculateUnreadMarker = useCallback(() => {
+ useEffect(() => {
// Iterate through the report actions and set appropriate unread marker.
// This is to avoid a warning of:
// Cannot update a component (ReportActionsList) while rendering a different component (CellRenderer).
@@ -406,48 +405,7 @@ function ReportActionsList({
if (!markerFound) {
setCurrentUnreadMarker(null);
}
- }, [sortedVisibleReportActions, shouldDisplayNewMarker, currentUnreadMarker, report.reportID]);
-
- useEffect(() => {
- calculateUnreadMarker();
- }, [calculateUnreadMarker, report.lastReadTime, messageManuallyMarkedUnread]);
-
- const onVisibilityChange = useCallback(() => {
- if (!Visibility.isVisible()) {
- userInactiveSince.current = DateUtils.getDBTime();
- return;
- }
- // In case the user read new messages (after being inactive) with other device we should
- // show marker based on report.lastReadTime
- const newMessageTimeReference = userInactiveSince.current > report.lastReadTime ? userActiveSince.current : report.lastReadTime;
- if (
- scrollingVerticalOffset.current >= MSG_VISIBLE_THRESHOLD ||
- !(
- sortedVisibleReportActions &&
- _.some(
- sortedVisibleReportActions,
- (reportAction) =>
- newMessageTimeReference < reportAction.created &&
- (ReportActionsUtils.isReportPreviewAction(reportAction) ? reportAction.childLastActorAccountID : reportAction.actorAccountID) !== Report.getCurrentUserAccountID(),
- )
- )
- ) {
- return;
- }
-
- Report.readNewestAction(report.reportID, false);
- userActiveSince.current = DateUtils.getDBTime();
- lastReadTimeRef.current = newMessageTimeReference;
- setCurrentUnreadMarker(null);
- cacheUnreadMarkers.delete(report.reportID);
- calculateUnreadMarker();
- }, [calculateUnreadMarker, report, sortedVisibleReportActions]);
-
- useEffect(() => {
- const unsubscribeVisibilityListener = Visibility.onVisibilityChange(onVisibilityChange);
-
- return unsubscribeVisibilityListener;
- }, [onVisibilityChange]);
+ }, [sortedVisibleReportActions, report.lastReadTime, report.reportID, messageManuallyMarkedUnread, shouldDisplayNewMarker, currentUnreadMarker]);
const renderItem = useCallback(
({item: reportAction, index}) => (