-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
#4083 fixed external link warning when user wants to make a donation #4133
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viditpawar0 We have the DonationPopup
functionality as well which we have recently added, which shows on the reader screen. So when the user clicks on the "Make a donation" button this method calls
kiwix-android/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt
Line 1676 in 9fc6e66
override fun openExternalUrl(intent: Intent) { |
According to your existing code, it will work fine with the Kiwix app, but for custom apps, we have overrided this method in CustomReaderFragment
to make custom behavior according to configuration. So we have to make the changes there as well so that when while user clicks on the donation button in custom apps this popup will not show.
Apart from these changes: The test cases are falling due to this change specially topLevelDestinationTest
so can you please fix that?
Sure, I'll do that. |
…tion for custom apps
…aderFragment.kt
All the requested changes have been done. Summary: -
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viditpawar0 Thanks for making the changes. Please see comments.
@@ -123,7 +123,6 @@ class TopLevelDestinationTest : BaseActivityTest() { | |||
clickSettingsOnSideNav(SettingsRobot::assertMenuSettingsDisplayed) | |||
clickHelpOnSideNav(HelpRobot::assertToolbarDisplayed) | |||
clickSupportKiwixOnSideNav() | |||
assertExternalLinkDialogDisplayed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same we are using in the GetContentShortcutTest
so please make the changes there as well.
@@ -186,7 +186,7 @@ class CustomMainActivity : CoreMainActivity() { | |||
private fun openExternalUrl(url: String) { | |||
// check if the provided url is not empty. | |||
if (url.isNotEmpty()) { | |||
externalLinkOpener.openExternalUrl(url.toUri().browserIntent()) | |||
externalLinkOpener.openExternalUrl(url.toUri().browserIntent(), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viditpawar0 This code is used from two places, so your code works fine when someone wants to make a donation, but it does not show the external link popup if there is about_app
URL is configured. It should show the external link popup for the about_app
URL.
Fixes #4083
Fixed external link warning when user wants to make a donation