Skip to content

Commit

Permalink
Fix home view if no internet
Browse files Browse the repository at this point in the history
  • Loading branch information
adisve committed Oct 26, 2023
1 parent e6fdfa1 commit 2b81cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Tumble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3;
MARKETING_VERSION = 3.4;
NETWORK_SETTINGS = testing;
NEW_SETTING = "";
PRODUCT_BUNDLE_IDENTIFIER = com.example.tumble;
Expand Down Expand Up @@ -2003,7 +2003,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3;
MARKETING_VERSION = 3.4;
NETWORK_SETTINGS = testing;
NEW_SETTING = "";
PRODUCT_BUNDLE_IDENTIFIER = com.example.tumble;
Expand Down Expand Up @@ -2047,7 +2047,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 3.3;
MARKETING_VERSION = 3.4;
NETWORK_SETTINGS = production;
NEW_SETTING = "";
PRODUCT_BUNDLE_IDENTIFIER = com.example.tumble;
Expand Down
2 changes: 1 addition & 1 deletion Tumble/Observables/ViewModels/HomeViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ final class HomeViewModel: ObservableObject {
.sink { [weak self] connected, isUpdating in
guard let self else { return }
if connected && !self.initialisedSession && !isUpdating {
self.setupRealmListener()
Task.detached(priority: .userInitiated) {
await self.fetchNews()
}
}
self.setupRealmListener()
}
.store(in: &cancellables)
}
Expand Down

0 comments on commit 2b81cb5

Please sign in to comment.