-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Save thread on kDrive #2088
base: master
Are you sure you want to change the base?
Conversation
1d9d5ed
to
f003f01
Compare
a7184a0
to
9fcddcf
Compare
7fe900c
to
e5322cb
Compare
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/DownloadMessagesViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/infomaniak/mail/data/api/ApiRepository.kt
Outdated
Show resolved
Hide resolved
@@ -1208,6 +1195,19 @@ class MainViewModel @Inject constructor( | |||
} | |||
} | |||
|
|||
fun getMessagesUidsFromThreadUids(selectedThreadsUuids: List<String>): List<String> { | |||
val messageUids = mutableListOf<String>() | |||
selectedThreadsUuids.forEach { threadUuid -> |
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.
This probably shouldn't be done on the main thread, maybe ask @sirambd to be sure.
But as the user could have a lots of thread and we're in a forEach, it could probably take too long to be done on the main thread
} | ||
|
||
fun getSubject(threadUuid: String): String? { | ||
return threadController.getThread(threadUuid)?.subject |
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.
Same reflexion as above on the main thread
2d0899b
to
c8d9269
Compare
var postfix = 1 | ||
var fileName = originalFileName | ||
|
||
while (listFileName.contains(fileName)) fileName = "$originalFileName (${postfix++})" |
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.
We could probably optimized this function
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/DownloadProgressDialog.kt
Outdated
Show resolved
Hide resolved
a68b16c
to
852fc8d
Compare
a923b3c
to
becd775
Compare
becd775
to
fdefc17
Compare
Quality Gate passedIssues Measures |
Allow to save messages and thread in kDrive