TrueSparrowSystems / AI-SalesSparrow-Android-App

MIT License
1 stars 0 forks source link

Disconnect salesforce flow #87

Closed dakshbhardwaj closed 1 year ago

dakshbhardwaj commented 1 year ago

Summary:

Summary by CodeRabbit

Release Notes:

coderabbitai[bot] commented 1 year ago

Walkthrough

This update introduces a new feature allowing users to disconnect from Salesforce. It includes changes in the authentication repository, view model, and screens to handle disconnection requests and responses, display confirmation dialogs, and navigate back to the login screen upon successful disconnection.

Changes

File Summary
.../repository/AuthenticationRepository.kt Introduced a LiveData property salesForceDisconnect and updated disconnectSalesForce() function to handle API calls for Salesforce disconnection.
.../screens/LoginScreen.kt Added response handling for Salesforce disconnection, including displaying custom toast messages based on the response type.
.../screens/SettingsScreen.kt Added a CustomAlertDialog component to confirm Salesforce disconnection and trigger the disconnection process.
.../viewmodals/AuthenticationViewModal.kt Added a LiveData property salesForceDisconnect and updated disconnectSalesForce() function to clear navigation stack after successful disconnection.

šŸ‡šŸ’»

"In the realm of code where rabbits dwell, A new feature's born, as I can tell. Disconnect from Salesforce with just a click, And navigate back, that's the trick! With LiveData and dialogues so neat, This update, my friends, is truly sweet!" šŸŽ‰šŸ„•

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - Mention `@coderabbitai` in any *review comment* for bot assistance. The bot stays silent unless called upon. - Note: Review comments are made on code diffs or files, not on the PR overview. ### Pause Incremental Reviews - Insert `@coderabbitai: ignore` in the PR description to halt the bot's ongoing reviews. Remove the line to resume.