Skip to content

Commit ac3c5c4

Browse files
committed
showing loading indicator while deleting the DB when work space is changed
1 parent 7319fa6 commit ac3c5c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

GoInfoGame/GoInfoGame/UI/InitialView/InitialViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ class InitialViewModel: ObservableObject {
5454
}
5555

5656
func checkAndDeleteWorkspaceDB(workspaceId: String) {
57+
isLoading = true
5758
if let existingWorkspaceId = KeychainManager.load(key: "workspaceID") {
5859
if existingWorkspaceId != workspaceId {
5960
print("User is changing the workpace. Delete all existing data from DB")
6061
DatabaseConnector.shared.clearDB()
6162
}
6263
}
63-
64+
isLoading = false
6465

6566
}
6667

0 commit comments

Comments
 (0)