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

[Android] fixed share icon display issue on android #462

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ public void open(Context context, final ReadableMap options, final Promise promi
setColor(builder, options, KEY_NAVIGATION_BAR_COLOR, "setNavigationBarColor", "navigation bar");
setColor(builder, options, KEY_NAVIGATION_BAR_DIVIDER_COLOR, "setNavigationBarDividerColor", "navigation bar divider");

if (options.hasKey(KEY_DEFAULT_SHARE_MENU_ITEM) &&
options.getBoolean(KEY_DEFAULT_SHARE_MENU_ITEM)) {
builder.addDefaultShareMenuItem();
if (options.hasKey(KEY_DEFAULT_SHARE_MENU_ITEM)) {
if (options.getBoolean(KEY_DEFAULT_SHARE_MENU_ITEM)) {
builder.setShareState(CustomTabsIntent.SHARE_STATE_ON);
} else {
builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF);
}
} else {
builder.setShareState(CustomTabsIntent.SHARE_STATE_OFF);
Copy link
Member

Choose a reason for hiding this comment

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

@hrishiakhade I think we can remove this else condition, so users can specify this option to enable/disable that share state instead, what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

@twocs oh I added a small comment here, sorry for the delay folks!
Next time, please send me a message from WhatsApp or Telegram, this is my profile: https://bio.link/jdnichollsc 🙏

}

if (options.hasKey(KEY_ANIMATIONS)) {
final ReadableMap animations = options.getMap(KEY_ANIMATIONS);
applyAnimation(context, builder, animations);
Expand Down