Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Useless Toasts and Other Minor Changes #12

Merged
merged 12 commits into from
May 4, 2024
Merged

Conversation

Tonnie-Dev
Copy link
Contributor

@Tonnie-Dev Tonnie-Dev commented Mar 31, 2024

  • Added a Toast to openWebPage() function on ContextExt.kt file
  • Removed the Toasts which should be on the caller's end
  • Introduced idiomatic code on selectAllThisAccount() on AccountSelectionViewModel
  • Correct preview rendering issue on CategoryTransactionListScreenContent
  • Added an intermediate compose screen to correct Failed to Instantiate ViewModel Rendering Error.
    preview

@@ -29,6 +30,9 @@ fun openWebPage(context: Context, webpage: String) {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
// Define what your app should do if no activity can handle the intent.
Toast.makeText(context, context.getString(R.string.no_browser_found), Toast.LENGTH_SHORT)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Tonnie-Dev, This method does not handle the browser. It seems and Am I missing anything here?

Copy link
Contributor Author

@Tonnie-Dev Tonnie-Dev Mar 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction, Did this without thinking much about it, will edit out the Toasts

@@ -40,6 +44,9 @@ fun openEmailToOption(context: Context, emailId: String) {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
// Define what your app should do if no activity can handle the intent.
Toast.makeText(context, context.getString(R.string.no_email_app_found), Toast.LENGTH_SHORT)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Tonnie-Dev, I appreciate your effort. Would returning the error message and handling it on the client/caller end make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tonnie-Dev Actually you are right, this is not the correct approach, I will edit my commits

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way have you set out Buy Me Coffee Account, Have learnt great deal from this repo and I would like to thank you personally 🙏🏽

@Tonnie-Dev Tonnie-Dev changed the title Modify ContextExt.kt file to add a Toast Remove Useless Toasts and Other Minor Changes Apr 24, 2024
Add IntermediateScreen for Preview
To remove redundant 'return` keyword
@nkuppan nkuppan merged commit 6e6bd4a into nkuppan:main May 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants