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

refactor: replace startActivityForResult with ActivityResultLauncher #1150

Merged
merged 4 commits into from
Jan 18, 2022
Merged

Conversation

Shvet
Copy link
Contributor

@Shvet Shvet commented Jan 11, 2022

New Pull Request Checklist

Issue Description

Related issue:
startActivityForReuslt was deprecated in adnroidx and replace with ActivityResultLauncher. So i have edited Login method and added ActivityResultLauncher<Intent> as a variable.

Approach

login method has new variable for ActivityResultLauncher<Intent> which can be replaced for startActivityForResult.
for example:

 val launcher: ActivityResultLauncher<Intent> = registerForActivityResult(
      ActivityResultContracts.StartActivityForResult()) { result ->
      ParseGoogleUtils.onActivityResult(result.resultCode, result.data!!)
 }

 // Login Using ParseGoogleUtils
 ParseGoogleUtils.logIn(requireContext(), launcher) { user, e -> }

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 11, 2022

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Related issue: #123 in the PR description, so I can recognize it.

@Shvet Shvet changed the title Replaced startActivityForResult to ActivityResultLauncher Feat: Replaced startActivityForResult to ActivityResultLauncher Jan 11, 2022
@mtrezza mtrezza changed the title Feat: Replaced startActivityForResult to ActivityResultLauncher refactor: replace startActivityForResult with ActivityResultLauncher Jan 12, 2022
@mtrezza mtrezza requested a review from a team January 12, 2022 20:56
@mtrezza
Copy link
Member

mtrezza commented Jan 12, 2022

@Shvet can you please review all checkboxes in the description?
Could you also take a look at the lint issue reported?

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #1150 (5c2e354) into master (447f972) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1150   +/-   ##
=========================================
  Coverage     66.81%   66.81%           
  Complexity     2249     2249           
=========================================
  Files           121      121           
  Lines          9892     9892           
  Branches       1332     1332           
=========================================
  Hits           6609     6609           
  Misses         2771     2771           
  Partials        512      512           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 447f972...5c2e354. Read the comment docs.

@Shvet
Copy link
Contributor Author

Shvet commented Jan 13, 2022

@Shvet can you please review all checkboxes in the description? Could you also take a look at the lint issue reported?

@mtrezza do i have to create issue for this? i didn't find any for this pull? AS for lint i have run :spotlessApply please check it.

@mtrezza
Copy link
Member

mtrezza commented Jan 13, 2022

do i have to create issue for this?

that would be helpful, we want to separate issue discussion from PR (solution) discussion.

AS for lint i have run :spotlessApply please check it.

passes now

@Shvet
Copy link
Contributor Author

Shvet commented Jan 13, 2022

Added issue

@mtrezza mtrezza linked an issue Jan 13, 2022 that may be closed by this pull request
4 tasks
@mtrezza
Copy link
Member

mtrezza commented Jan 17, 2022

@L3K0V Do you think we can merge this?

@azlekov
Copy link
Contributor

azlekov commented Jan 17, 2022

@mtrezza LGTM

@mtrezza mtrezza merged commit 6fad701 into parse-community:master Jan 18, 2022
@parseplatformorg
Copy link

🎉 This change has been released in version 3.0.1

@parseplatformorg parseplatformorg added the state:released Released as stable version label May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

startActivityForResult has been deprecated in favor of ActivityResultLauncher
4 participants