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

Fixes Missing Call Icons when threads are enabled #5847

Merged
merged 4 commits into from
Apr 26, 2022

Conversation

ericdecanini
Copy link
Contributor

@ericdecanini ericdecanini commented Apr 26, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fixes missing call menu items due to ifRoom being used instead of always

Motivation and context

Closes #5840

I also added lint suprression and comments explaining why we keep these icons as app:showAsAction="always" as it can be very easy to overlook with the IDE warnings

Screenshots / GIFs

Before After
Screenshot_20220426_221120_im vector app debug Screenshot_20220426_220258_im vector app debug

Tests

  • Enable threads
  • Go to any room
  • See video call, voice call, and threads icons in the action bar

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 10

Checklist

@ericdecanini ericdecanini requested a review from bmarty April 26, 2022 19:12
@ericdecanini ericdecanini changed the title Fixes Missing Call Icons Fixes Missing Call Icons when threads are enabled Apr 26, 2022
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the quick PR. 2 small remarks

<item
android:id="@+id/menu_timeline_thread_list"
android:title="@string/action_view_threads"
android:visible="false"
app:actionLayout="@layout/view_thread_notification_badge"
app:iconTint="?colorPrimary"
app:showAsAction="always"
tools:visible="true" />
tools:visible="true"
tools:ignore="AlwaysShowAction" />
Copy link
Member

Choose a reason for hiding this comment

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

Strangely adding this attribute in this item XML tag also has an effect on the warnings of the other item tags 🤔 .
Anyway for clarity, you should probably move this tools:ignore to the root XML tag menu.

tools:visible="true" />

<!-- We always want to show this item as an icon -->
<item
android:id="@+id/voice_call"
android:icon="@drawable/ic_phone"
android:title="@string/call"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe take the opportunity to use action_voice_call instead of call for parity. action_voice_call has the value "Voice call". This string can still be visible by the user when long pressing on the menu item.

@github-actions
Copy link

github-actions bot commented Apr 26, 2022

Unit Test Results

114 files  ±0  114 suites  ±0   1m 27s ⏱️ -1s
202 tests ±0  202 ✔️ ±0  0 💤 ±0  0 ±0 
678 runs  ±0  678 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 9c95168. ± Comparison against base commit d694ea1.

♻️ This comment has been updated with latest results.

@ericdecanini ericdecanini requested a review from bmarty April 26, 2022 20:14
@bmarty bmarty enabled auto-merge April 26, 2022 20:20
@bmarty bmarty merged commit 521fd1f into develop Apr 26, 2022
@bmarty bmarty deleted the bugfix/eric/missing-call-icons branch April 26, 2022 20:30
bmarty added a commit that referenced this pull request Apr 28, 2022
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.

Enabling threads hides the voice call button
2 participants