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

chore: replace deprecated functions #2931

Merged
merged 9 commits into from
Apr 25, 2024
Merged

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Apr 23, 2024


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Replacing deprecated functions and some cleanup 🧹

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@ohassine ohassine changed the title chore: remove deprecated functions chore: replace deprecated functions Apr 23, 2024
@ohassine ohassine requested review from a team, typfel, yamilmedina, borichellow, MohamadJaara and vitorhugods and removed request for a team April 23, 2024 10:38
@@ -100,12 +100,12 @@ fun MLSProgressIndicator(
contentAlignment = Alignment.Center
) {
LinearProgressIndicator(
progress = progress,
progress = { progress },
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if passing this as lambda will cause unnecessary recomposition?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually it's the opposite, using the lambda will prevent recomposition. If progress value changes then only the lambda function will re-run not all the screen

Copy link
Member

@MohamadJaara MohamadJaara Apr 24, 2024

Choose a reason for hiding this comment

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

not really, a new state value a composition for the whole screen and when evaluating lambda objects it will always not be equal in this case (even if the value of progress did not change)
i can be wrong tho

Copy link
Member Author

Choose a reason for hiding this comment

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

The read of the value will be done in the child composable, so it won't effect as explained here
https://youtu.be/ahXLwg2JYpc?t=356

And the current one is deprecated: "Use the overload that takes progress as a lambda "

Copy link
Contributor

github-actions bot commented Apr 23, 2024

Test Results

903 tests  ±0   903 ✅ ±0   8m 56s ⏱️ - 2m 38s
123 suites ±0     0 💤 ±0 
123 files   ±0     0 ❌ ±0 

Results for commit a1c7b37. ± Comparison against base commit aefe51b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 4398 succeeded.

The build produced the following APK's:

@codecov-commenter
Copy link

codecov-commenter commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 44.15%. Comparing base (aefe51b) to head (19b8fef).

❗ Current head 19b8fef differs from pull request most recent head a1c7b37. Consider uploading reports for the commit a1c7b37 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2931      +/-   ##
===========================================
+ Coverage    44.09%   44.15%   +0.06%     
===========================================
  Files          442      442              
  Lines        14302    14298       -4     
  Branches      2458     2457       -1     
===========================================
+ Hits          6306     6313       +7     
+ Misses        7305     7294      -11     
  Partials       691      691              
Files Coverage Δ
.../wire/android/mapper/SystemMessageContentMapper.kt 49.65% <100.00%> (ø)
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <ø> (ø)
...id/ui/home/conversationslist/ConversationRouter.kt 0.00% <ø> (ø)
...d/ui/home/sync/FeatureFlagNotificationViewModel.kt 56.37% <100.00%> (+0.67%) ⬆️
...ndroid/ui/userprofile/avatarpicker/AvatarPicker.kt 0.00% <ø> (ø)
...droid/ui/emoji/HandleDraggableBottomSheetDialog.kt 0.00% <0.00%> (ø)
...ome/messagecomposer/DropDownMentionsSuggestions.kt 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@AndroidBob
Copy link
Collaborator

Build 4414 failed.

@AndroidBob
Copy link
Collaborator

Build 4424 failed.

@ohassine ohassine enabled auto-merge April 25, 2024 08:35
@ohassine ohassine added this pull request to the merge queue Apr 25, 2024
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit de5104b Apr 25, 2024
11 of 12 checks passed
@ohassine ohassine deleted the remove-depracted-functions branch April 25, 2024 09:12
@AndroidBob
Copy link
Collaborator

Build 4441 succeeded.

The build produced the following APK's:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants