Repository navigation
[wasm] download selected file on double click - #1345
Merged
clairernovotny merged 3 commits intoAug 14, 2021
Merged
Conversation
Xiaoy312
reviewed
Aug 14, 2021
| behavior:TreeViewBehavior.EnableSelectedItemBinding="True" | ||
| behavior:TreeViewBehavior.SelectedItem="{Binding SelectedContent, Mode=TwoWay}" | ||
| behavior:TreeViewBehavior.AutoToggleItemExpansion="True" | ||
| behavior:TreeViewBehavior.DoubleClickCommand="{Binding DoubleClickCommand}" |
Contributor
Collaborator
Author
There was a problem hiding this comment.
Yes, that it also possible. But right clicks to open custom context menus aren't very common on the web, that's why I went for double click. (It is also used to download a package from the feed, so there is a little symmetry to that.)
Xiaoy312
reviewed
Aug 14, 2021
Xiaoy312
reviewed
Aug 14, 2021
|
|
||
| public async Task DoubleClick() | ||
| { | ||
| if (SelectedContent is IFile file) |
Contributor
There was a problem hiding this comment.
I would wrap this entire method in #if __WASM__ || __MACOS__ or #if !HAS_UNO_SKIA_GTK, because FileSavePicker arnt supported yet for GTK. While no one uses NPE on that platform atm, but it is better to be safe.
Collaborator
Author
There was a problem hiding this comment.
I guess it will be supported soon: unoplatform/uno#6544
But yes, I could #if it for now.
campersau
force-pushed
the
wasmdownloadfile
branch
from
August 14, 2021 12:14
520198b to
ae546b8
Compare
which can be removed when unoplatform/uno#6544 is available
Xiaoy312
approved these changes
Aug 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Will automatically get more awesome with unoplatform/uno#6619