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

Clear the URL bar if this file type is unsupported. #3260

Merged
merged 1 commit into from Apr 28, 2020

Conversation

daoshengmu
Copy link
Contributor

Fixes #3248.

I hope using postValue() is right instead of setValue()

@daoshengmu daoshengmu self-assigned this Apr 27, 2020
@daoshengmu daoshengmu added this to the #10 features milestone Apr 27, 2020
@daoshengmu daoshengmu changed the title Clear the URL bar if this file is unsupported. Clear the URL bar if this file type is unsupported. Apr 28, 2020
Copy link
Collaborator

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

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

When you are is a website and you try to open the file, the URL bar is cleared. I think we should fix it just removing the setUrl call from:

public void onPageStart(@NonNull GeckoSession geckoSession, @NonNull String aUri) {
mCaptureOnPageStop = true;
mViewModel.setUrl(aUri);

as we are already updating in:
public void onLocationChange(@NonNull GeckoSession session, @Nullable String url) {
mViewModel.setUrl(url);

That should fix it.

@daoshengmu
Copy link
Contributor Author

It works as you said. Thanks.

@bluemarvin bluemarvin dismissed keianhzo’s stale review April 28, 2020 21:10

Requested change was made.

@bluemarvin bluemarvin merged commit 5b346b6 into master Apr 28, 2020
@bluemarvin bluemarvin deleted the clearAwesomebarUnsupporedFile branch April 28, 2020 21:10
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.

The path of the unsupported file wrongly remains displayed in the Awesomebar
3 participants