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

fix: status bar colour during theme change #WPB-11158 #3494

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

damian-kaczmarek
Copy link
Contributor

@damian-kaczmarek damian-kaczmarek commented Oct 10, 2024

StoryWPB-11158 [Android] edege to edge display is not working as expected when targeting android 15

What's new in this PR?

Issues

If status bar had set color the color was overwritten by the night mode change. Now

Causes (Optional)

The night mode change was firing after status bar color change, overwriting the color.

Solutions

Now CommonTopAppBar listens to the theme changes so it can reapply the color. I tried do it on a higher level without adding this dependency but did not managed. I also plan to replace rememberSystemUiController with Activity.enableEdgeToEdge that was added to the androidx.activity in a separate PR Edit: not feasible at this time

How to Test

Start a call to your device. Status bar should be coloured to green
Go to settings - appearance while call is in progress
Start changing the theme
Status bar still should be coloured after change

Attachments (Optional)

Before

before.mp4

After

after.mp4

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.

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.43%. Comparing base (072df6b) to head (95098ee).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3494      +/-   ##
===========================================
- Coverage    44.43%   44.43%   -0.01%     
===========================================
  Files          466      466              
  Lines        15744    15749       +5     
  Branches      2653     2653              
===========================================
+ Hits          6996     6998       +2     
- Misses        7991     7994       +3     
  Partials       757      757              
Files with missing lines Coverage Δ
...rc/main/kotlin/com/wire/android/ui/WireActivity.kt 0.00% <ø> (ø)

... and 2 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 072df6b...95098ee. Read the comment docs.

Copy link
Contributor

Built wire-android-staging-compat-pr-3494.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3494.apk is available for download

ThemeOption.DARK -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
}
}
HandleThemeChanges(viewModel.globalAppState.themeOption)
Copy link
Contributor

Choose a reason for hiding this comment

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

good one 🍇

Copy link

sonarcloud bot commented Oct 10, 2024

Copy link
Contributor

Built wire-android-staging-compat-pr-3494.apk is available for download

Copy link
Contributor

Built wire-android-dev-debug-pr-3494.apk is available for download

@damian-kaczmarek damian-kaczmarek added this pull request to the merge queue Oct 10, 2024
@damian-kaczmarek damian-kaczmarek changed the title fix: status bar color during theme change #WPB-11158 fix: status bar colour during theme change #WPB-11158 Oct 10, 2024
Merged via the queue into develop with commit ffd5445 Oct 10, 2024
16 checks passed
@damian-kaczmarek damian-kaczmarek deleted the fix/status-bar-color-when-calling branch October 10, 2024 14:13
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.

4 participants