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

pass account ID in chat shortcuts and properly switch to account #3558

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

adbenitez
Copy link
Member

close #3557

@adbenitez adbenitez added the bug label Jan 23, 2025
@adbenitez adbenitez requested review from r10s and Hocuri January 23, 2025 02:47
@adbenitez adbenitez self-assigned this Jan 23, 2025
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

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

nice! straight-forward, thanks a lot for fixing!

Comment on lines -211 to -215
String shortcutId = intent.getStringExtra(ShortcutManagerCompat.EXTRA_SHORTCUT_ID);
if (chatId == -1 && shortcutId != null) {
chatId = Integer.parseInt(shortcutId);
}

Copy link
Member

@r10s r10s Jan 23, 2025

Choose a reason for hiding this comment

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

wondering where this came from. indeed, looks useless :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, couldn't find any similar usage in the Internet, maybe we were using the intent ID to pass the chat id at the beginning so this was kept as a migration step or it was from android <=4 times

Copy link
Member Author

Choose a reason for hiding this comment

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

And we don't even do it for other shortcuts we create

@adbenitez adbenitez merged commit d75b2c2 into main Jan 23, 2025
2 checks passed
@adbenitez adbenitez deleted the adb/issue-3557 branch January 23, 2025 12:23
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.

chat-shortcuts on the homescreen do not switch to correct profile
2 participants