Skip to content

Fix phone number text direction#399

Merged
naveensingh merged 6 commits into
FossifyOrg:masterfrom
Ammar64:master
Jun 6, 2025
Merged

Fix phone number text direction#399
naveensingh merged 6 commits into
FossifyOrg:masterfrom
Ammar64:master

Conversation

@Ammar64
Copy link
Copy Markdown
Contributor

@Ammar64 Ammar64 commented May 17, 2025

Type of change(s)

  • Bug fix

What changed and why

  • Changed the android:textDirection of TextViews, that holds the phone number or contact name, to firstStrongLtr

Before/After Screenshots/Screen Record

Before After
before before

Fixes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I manually tested my changes on device/emulator (if applicable).

@Ammar64
Copy link
Copy Markdown
Contributor Author

Ammar64 commented May 17, 2025

Your bot missed up the screenshots

@naveensingh
Copy link
Copy Markdown
Member

Your bot missed up the screenshots

He doesn't like tables. Another thing that needs fixing.

If you just drop your screenshots, they'll be minimized properly.

@naveensingh naveensingh self-assigned this May 18, 2025
Copy link
Copy Markdown
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

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

I noticed you have done this for fields that do not hold any numeric values, e.g., notification_call_status. Is there any reason for that?

Comment thread CHANGELOG.md Outdated
@naveensingh naveensingh added the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Jun 6, 2025
@Ammar64
Copy link
Copy Markdown
Contributor Author

Ammar64 commented Jun 6, 2025

I noticed you have done this for fields that do not hold any numeric values, e.g., notification_call_status. Is there any reason for that?

I made the change to all TextViews that I thought they may hold phone number.
For an example item_recents_name shows the contact name when available, but if there is no contact name it shows the phone number.
As for notification_call_status I don't remember where does it show up, but since I changed it, it means the I thought it would hold a phone number back then.

Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com>
@naveensingh
Copy link
Copy Markdown
Member

notification_call_status is for call status, not a number:

val contentTextId = when (callState) {
Call.STATE_RINGING -> R.string.is_calling
Call.STATE_DIALING -> R.string.dialing
Call.STATE_DISCONNECTED -> R.string.call_ended
Call.STATE_DISCONNECTING -> R.string.call_ending
else -> R.string.ongoing_call
}
val collapsedView = RemoteViews(context.packageName, R.layout.call_notification).apply {
setText(R.id.notification_caller_name, callerName)
setText(R.id.notification_call_status, context.getString(contentTextId))

Same deal with filter_contact_source_checkbox.

@Ammar64
Copy link
Copy Markdown
Contributor Author

Ammar64 commented Jun 6, 2025

notification_call_status is for call status, not a number:

I've fixed them now.
It wouldn't cause issues though.

@naveensingh naveensingh removed the waiting for author If the author does not respond, the issue will be closed. Otherwise, the label will be removed. label Jun 6, 2025
Copy link
Copy Markdown
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

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

Thanks. Let's hope nobody uses emojis as name prefix.

@naveensingh naveensingh merged commit 686c12f into FossifyOrg:master Jun 6, 2025
3 of 5 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.

Reverse phone number in rtl

2 participants