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

fix: Correctly load Draft body #857

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

PhilippeWeidmann
Copy link
Member

Write complete body in realm only once after complete loading.
Add signature after initial loading.
Only add signature for new messages, reply, forward.

@PhilippeWeidmann PhilippeWeidmann requested a review from a team as a code owner July 6, 2023 12:19
@PhilippeWeidmann PhilippeWeidmann force-pushed the fix-loading-body branch 2 times, most recently from 4ad5385 to 0a091fb Compare July 6, 2023 12:31
@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@adrien-coye adrien-coye left a comment

Choose a reason for hiding this comment

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

I added a note for a nice to have. Also after some time testing I found no issue with this PR.

let shouldAddSignatureText: Bool

if let messageReply {
// New draft created either with reply or forward
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine right now, a "nice to have" could be to create an enum DraftOrigin and switch on it, this way we can document each case in the enum and it might be easier to read than a list of if/else. And the logic behind each case is explicit

@PhilippeWeidmann PhilippeWeidmann merged commit 075cec1 into master Jul 6, 2023
5 checks passed
@PhilippeWeidmann PhilippeWeidmann deleted the fix-loading-body branch July 6, 2023 14:12
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.

None yet

2 participants