Skip to content

Commit

Permalink
Remove setting items as read when going on background on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Jul 20, 2024
1 parent a416e74 commit d516b8d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
7 changes: 6 additions & 1 deletion iosApp/FeedFlow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,11 @@
inputFileListPaths = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}",
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist",
"$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
"$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)",
);
name = Crashlytics;
outputFileListPaths = (
Expand Down Expand Up @@ -1089,7 +1094,7 @@
repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
requirement = {
kind = exactVersion;
version = 10.25.0;
version = 10.29.0;
};
};
CCF647572B6EEFC0006C8843 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "97940381e57703c07f31a8058d8f39ec53b7c272",
"version" : "10.25.0"
"revision" : "eca84fd638116dd6adb633b5a3f31cc7befcbb7d",
"version" : "10.29.0"
}
},
{
Expand All @@ -42,8 +42,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "16244d177c4e989f87b25e9db1012b382cfedc55",
"version" : "10.25.0"
"revision" : "fe727587518729046fc1465625b9afd80b5ab361",
"version" : "10.28.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion iosApp/Source/Home/HomeScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ struct HomeScreen: View {
.onChange(of: scenePhase) { newScenePhase in
switch newScenePhase {
case .background:
homeViewModel.markAsReadAndSync(lastVisibleIndex: Int32(indexHolder.getLastReadIndex()))
homeViewModel.enqueueBackup()
default:
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ class HomeViewModel internal constructor(
}
}

fun markAsReadAndSync(lastVisibleIndex: Int) {
fun enqueueBackup() {
scope.launch {
markAsReadOnScroll(lastVisibleIndex)
feedSyncRepository.enqueueBackup()
}
}
Expand Down

0 comments on commit d516b8d

Please sign in to comment.