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

feat: Save thread on kDrive #2088

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Conversation

NicolasBourdin88
Copy link
Contributor

@NicolasBourdin88 NicolasBourdin88 commented Nov 1, 2024

Allow to save messages and thread in kDrive

Screenshot_1730453896

@NicolasBourdin88 NicolasBourdin88 added the feature Add a new function or capability to the project label Nov 1, 2024
@NicolasBourdin88 NicolasBourdin88 requested a review from a team November 1, 2024 09:41
@NicolasBourdin88 NicolasBourdin88 self-assigned this Nov 1, 2024
@NicolasBourdin88 NicolasBourdin88 force-pushed the save-thread-on-kDrive branch 5 times, most recently from a7184a0 to 9fcddcf Compare November 22, 2024 12:01
@NicolasBourdin88 NicolasBourdin88 requested review from FabianDevel and removed request for a team November 22, 2024 12:08
@NicolasBourdin88 NicolasBourdin88 marked this pull request as ready for review November 22, 2024 12:09
@NicolasBourdin88 NicolasBourdin88 force-pushed the save-thread-on-kDrive branch 2 times, most recently from 7fe900c to e5322cb Compare November 22, 2024 14:52
app/build.gradle Outdated Show resolved Hide resolved
app/src/main/java/com/infomaniak/mail/ui/MainViewModel.kt Outdated Show resolved Hide resolved
app/src/main/java/com/infomaniak/mail/ui/MainViewModel.kt Outdated Show resolved Hide resolved
app/src/main/java/com/infomaniak/mail/ui/MainViewModel.kt Outdated Show resolved Hide resolved
app/src/main/java/com/infomaniak/mail/ui/MainViewModel.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 ->
Copy link
Contributor

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
Copy link
Contributor

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

@NicolasBourdin88 NicolasBourdin88 force-pushed the save-thread-on-kDrive branch 10 times, most recently from 2d0899b to c8d9269 Compare November 22, 2024 16:38
var postfix = 1
var fileName = originalFileName

while (listFileName.contains(fileName)) fileName = "$originalFileName (${postfix++})"
Copy link
Contributor

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

@NicolasBourdin88 NicolasBourdin88 force-pushed the save-thread-on-kDrive branch 3 times, most recently from a68b16c to 852fc8d Compare December 16, 2024 15:22
@NicolasBourdin88 NicolasBourdin88 changed the title Save thread on kDrive feat: Save thread on kDrive Dec 17, 2024
@NicolasBourdin88 NicolasBourdin88 force-pushed the save-thread-on-kDrive branch 2 times, most recently from a923b3c to becd775 Compare December 19, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add a new function or capability to the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants