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: Scheduled sending #1619

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

feat: Scheduled sending #1619

wants to merge 64 commits into from

Conversation

lebojo
Copy link
Contributor

@lebojo lebojo commented Nov 19, 2024

This PR introduces the Scheduled Send feature to the kMail iOS app, allowing users to schedule emails to be sent at a later time.

Key Changes

  • Added UI components for scheduling email (date and time picker).
  • Integrated scheduling logic with the existing email sending flow.
  • Updated backend API calls to handle scheduled send data.
  • Added validation for scheduling times (e.g., no past dates).
  • Enhanced error handling and user feedback for scheduling failures.
  • Reschedule header for scheduled email not sent yet
  • Localised strings
Capture d’écran 2024-11-19 à 16 40 33

Copy link

github-actions bot commented Nov 19, 2024

Found 1 unused code occurences

Expand
Mail/Views/Alerts/CustomScheduleModalView.swift:30:9: warning: Property 'startingDate' is assigned, but never used

@lebojo lebojo force-pushed the feat-Scheduled-sending branch 7 times, most recently from 3e2cb04 to 3b6959a Compare November 25, 2024 12:35
Copy link

sonarcloud bot commented Dec 3, 2024

"editSendDescription" = "Programmation annulée. Ce message sera déplacé dans vos brouillons pour être envoyé quand vous le souhaitez.";

/* loco:6723a9b2b22031bf3701ae62 */
"editSendTitle" = "Modifier l’envoie";
Copy link
Member

Choose a reason for hiding this comment

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

envoi

@@ -802,6 +832,9 @@
/* loco:649424a6e244ffcc6c011135 */
"errorRefusedSender" = "Le serveur refuse l’expéditeur";

/* loco:672900a15da35624510b2c32 */
"errorScheduleTooShort" = "Le délai minimum est de 5 minutes.";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"errorScheduleTooShort" = "Le délai minimum est de 5 minutes.";
"errorScheduleDelayTooShort" = "Le délai minimum est de 5 minutes.";

Text(MailResourcesStrings.Localizable.datePickerTitle)
.textStyle(.bodyMedium)
.padding(.bottom, IKPadding.alertTitleBottom)
DatePicker("", selection: $selectedDate, in: Date.minimumScheduleDelay...)
Copy link
Member

Choose a reason for hiding this comment

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

Even if we don't show it, the label is used by the accessibility reader

private func modifySchedule() {
Task {
await mailboxManager.moveScheduleToDraft(draftResource: draftResource)
if let draft = await mailboxManager.loadRemotely(from: draftResource) {
Copy link
Member

Choose a reason for hiding this comment

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

Use guard

Comment on lines +33 to +34

DraftUtils.editDraft(from: message, mailboxManager: mailboxManager, composeMessageIntent: composeMessageIntent)
Copy link
Member

Choose a reason for hiding this comment

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

Revert

Copy link
Member

Choose a reason for hiding this comment

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

Use the existing one with yellow stars

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