Skip to content

Commit

Permalink
Add error logs for all unknown errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Aug 9, 2024
1 parent 20180c2 commit 3f518b7
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,19 @@ class ConnectViewModel(
}

fun onDisconnectClick() {
viewModelScope.launch { connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
} }
viewModelScope.launch {
connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
}
}
}

fun onReconnectClick() {
viewModelScope.launch { connectionProxy.reconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
} }
viewModelScope.launch {
connectionProxy.reconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
}
}
}

fun onConnectClick() {
Expand Down Expand Up @@ -160,9 +164,11 @@ class ConnectViewModel(
}

fun onCancelClick() {
viewModelScope.launch { connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
} }
viewModelScope.launch {
connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.ConnectError.Generic)
}
}
}

fun onManageAccountClick() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ class OutOfTimeViewModel(
}

fun onDisconnectClick() {
viewModelScope.launch { connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.GenericError)
} }
viewModelScope.launch {
connectionProxy.disconnect().onLeft { _uiSideEffect.send(UiSideEffect.GenericError) }
}
}

private fun verifyPurchases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class WelcomeViewModel(
}

fun onDisconnectClick() {
viewModelScope.launch { connectionProxy.disconnect().onLeft {
_uiSideEffect.send(UiSideEffect.GenericError)
} }
viewModelScope.launch {
connectionProxy.disconnect().onLeft { _uiSideEffect.send(UiSideEffect.GenericError) }
}
}

private fun verifyPurchases() {
Expand Down
Loading

0 comments on commit 3f518b7

Please sign in to comment.