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: Created By appears immediately after adding Group Note #2305

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

ahmedfahim21
Copy link
Contributor

@ahmedfahim21 ahmedfahim21 commented Mar 6, 2025

Description

When adding a note to a group, the "Created By" (user) was not reflected immediately. However, after a page refresh, it appeared correctly.

Root Cause

The issue was due to a mismatch in the this context when calling addNote(). The this reference inside addNote() was different from the one used during component initialization, leading to this.username being undefined.

Fix

Ensured that this.addNote() was binded to the correct this.
Kept the constructor clean and moved logic to ngOnInit()

Related issues and discussion

Fixed issue web-37

Screenshots, if any

Screenshot from 2025-03-06 21-53-55

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • If you have multiple commits please combine them into one commit by squashing them.

  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

@IOhacker IOhacker merged commit 285865d into openMF:master Mar 6, 2025
2 checks passed
@ahmedfahim21 ahmedfahim21 deleted the fix-group-notes branch March 7, 2025 09:38
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