Conversation
It 100% needs tests but we don't have a good mechanism for writing tests yet, blocked on #307 in part |
|
Alternatively, how could this functionality be tested? (rendering a message with an attachment, then downloading the attachment) |
|
From looking at the code, it's not clear where does it integrate with the UI and how do I download an attachment to my device as a user. Where is the handling of the tap on the attachment to download it? |
|
so the UI handling is also in this scope, I'll add. Do I need to implement the details of attachment? I mean if it's PDF should I show in separate view that PDF file? |
No, I'd just like to tap the attachment name to download the file, whatever the file is. No need a separate view. |
|
should I show a toast that notifies user that the file was saved? |
I think yes - for a user, visual feedback is good to have. |
Added tests for files manager;
|
|
||
| } | ||
|
|
||
| public override func layoutDidFinish() { |
There was a problem hiding this comment.
@Kharchevskyi here is the fix that I was talking about
There was a problem hiding this comment.
Please check next commit with better approach for this. Please confirm this one is works for you
tomholub
left a comment
There was a problem hiding this comment.
code looks good, will test the app now
|
I'm having trouble building this, please merge changes from master into here and resolve conflicts. Thanks! |
tomholub
left a comment
There was a problem hiding this comment.
After I save the attachment, where can I find it?
I have tried to save an image, but can't find it anywhere on my phone. I would expect it to be in Downloads.
Best would be if after I download the attachment, it would pop up a modal that says
Attachment downloaded
[open now]
[close]
Where I could click open and iOS would figure out which app to open it with (like on a desktop).
But that's not strictly necessary, it would be for now enough to at least tell the user where to find their attachment so that they can open it themselves.
| "message_compose_secure" = "Compose Secure Message"; | ||
| "message_unknown_sender" = "(unknown sender)"; | ||
| "message_missed_subject" = "No subject"; | ||
| "message_attachment_saved_successfully" = "Attachemt was saved"; |
|
For now files store in Documents folder which iOS creates for every app. In order to save file to Downloads(you may access it using Files native app) we need to use |
As a user, how can I open the file after it downloads? |
|
For now there is no way, I though we will add files reading inside of app in future. |
|
No, this is not useful as is.
I want users to be able to actually get the file they received and do with
it what they want, like on a desktop. open with another app, transfer to
pc, send through whatsapp, whatever.
when not sure, have a look at what other email clients do
…On Wednesday, June 23, 2021, Evgenii Kievsky ***@***.***> wrote:
For now there is no way, I though we will add files reading inside of app
in future.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#352 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEKXVBZ55RCL55KJW5LTUHY3PANCNFSM46Z4STYA>
.
--
--
Tom James Holub <http://holub.me/>
|
|
Other email clients have theirs own readers. But I got your point I'll add this documents reader. Thanks |
|
that sounds like a lot of work. could you estimate the amount of work to
add a document reader vs save to downloads?
is there a standardised ios document reader to add or is that something we
have to implement?
…On Thursday, June 24, 2021, Evgenii Kievsky ***@***.***> wrote:
Other email clients have theirs own readers. But I got your point I'll add
this documents reader. Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#352 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEPP4RJKOBG6AW57AGLTUL4J5ANCNFSM46Z4STYA>
.
--
--
Tom James Holub <http://holub.me/>
|
|
It won't take a lot of time, around an hour, it comes from native SDK. |
|
ok - that sounds good. thanks!
…On Thursday, June 24, 2021, Evgenii Kievsky ***@***.***> wrote:
It won't take a lot of time, around an hour, it comes from native SDK.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#352 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEOJ3ZSSYXGKTKY64CLTUMCS3ANCNFSM46Z4STYA>
.
--
--
Tom James Holub <http://holub.me/>
|
Opened saved files using Files app;
|
Had some merging side effects. So, I added UIDocumentInteractionController. The flow is following:
|
tomholub
left a comment
There was a problem hiding this comment.
Much better! There is a bug though:
- click download icon on a small text file
- when choosing location, I only saw various app folders, but not
Downloadsfolder. So I made a new folder calledtest folder - click done
- get prompted to open the file, said yes
- the app took me to Downloads folder. But I saved it elsewhere
I'll merge this, and then you can fix this in a followup PR. Thanks!

This PR adds Files Manager that allows app to save attachments to user's phone
close #194
Tests:
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):