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

Tell the observer if the download is coming from a private tab #97

Closed

Conversation

ilpianista
Copy link

Follow up of sailfish-browser!1057 to propagate the private mode information.

@pvuorela pvuorela requested a review from rainemak April 9, 2024 10:06
Copy link
Member

@rainemak rainemak left a comment

Choose a reason for hiding this comment

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

Not quite there yet but close. I think idea to deliver private status to the user interface is good and should be implemented. Provided some guidelines and instructions how this should be improved.

jscomps/EmbedliteDownloadManager.js Outdated Show resolved Hide resolved
@@ -89,6 +91,7 @@ let DownloadView = {
JSON.stringify({
msg: "dl-fail",
id: download.id,
privateMode: PrivateBrowsingUtils.isContentWindowPrivate(Services.ww.activeWindow) || false,
Copy link
Member

Choose a reason for hiding this comment

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

When downloading normally without pausing / cancelling and continuing download these "embed:download" notifies inside onDownloadAdded should not trigger.

In normal scenario onDownloadAdded gets called only once per download (first thing that happens). To report status changes you need to stringify download.source.isPrivate for each "embed:download" notifies of the onDownloadChanged (and onDownloadAdded). Simpler just to have it foreach "embed:download" message.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure I understood this, please have a look to my changes. Thanks!

jscomps/EmbedliteDownloadManager.js Outdated Show resolved Hide resolved
@rainemak
Copy link
Member

rainemak commented May 8, 2024

Any comments?

@ilpianista
Copy link
Author

Any comments?

I would like to implement your changes, but had no time to work on it. Maybe next week 🤞

@ilpianista ilpianista force-pushed the feature/private-mode-download branch from 6fb7349 to d27bcda Compare May 14, 2024 20:37
@ilpianista ilpianista force-pushed the feature/private-mode-download branch from d27bcda to 8a17fd0 Compare May 14, 2024 20:40
@ilpianista ilpianista requested a review from rainemak May 27, 2024 19:56
@rainemak
Copy link
Member

rainemak commented Jul 9, 2024

I would like to implement your changes, but had no time to work on it. Maybe next week 🤞

Thanks, it's almost there. Easier to explain in form of PR this #98 so I created one. Point is that we need to pass privateMode update from each download message that we send from the embedlite-components to browser app.

@ilpianista ilpianista closed this Sep 25, 2024
@ilpianista ilpianista deleted the feature/private-mode-download branch September 25, 2024 08:52
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.

2 participants