Skip to content

Added notification when a project has a newer version available on the server#4386

Open
gabriel-bolbotina wants to merge 3 commits intomasterfrom
project-update-req-notification
Open

Added notification when a project has a newer version available on the server#4386
gabriel-bolbotina wants to merge 3 commits intomasterfrom
project-update-req-notification

Conversation

@gabriel-bolbotina
Copy link
Copy Markdown
Contributor

Added a function in mergin api that checks if the project needs a sync and fires a notification in case it is needed.

Tested to work for the currently open project and when switching from one project to another

Use case below:
https://github.com/user-attachments/assets/e0c01bec-5a55-4e22-82a4-2a50c673825b

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

Pull Request Test Coverage Report for Build 23610078756

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 116 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.09%) to 59.875%

Files with Coverage Reduction New Missed Lines %
mm/app/attributes/attributecontroller.cpp 1 76.83%
mm/app/notificationmodel.h 3 50.0%
mm/core/merginapi.cpp 15 75.34%
mm/app/notificationmodel.cpp 18 49.47%
mm/app/activeproject.cpp 79 70.37%
Totals Coverage Status
Change from base Build 22999470615: 0.09%
Covered Lines: 8804
Relevant Lines: 14704

💛 - Coveralls

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 65151 dmg Expires: 10/06/2026 #6515
linux Build 📬 Mergin Maps 65261 x86_64 Expires: 10/06/2026 #6526
win64 Build 📬 Mergin Maps 57101 win64 Expires: 10/06/2026 #5710
Android Build 📬 Mergin Maps 782511 APK [armeabi-v7a] Expires: 10/06/2026 #7825
Android Build 📬 Mergin Maps 782551 APK [arm64-v8a] Expires: 10/06/2026 #7825
iOS Build 📬 Build number: 26.03.876611 #8766

Copy link
Copy Markdown
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

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

It will need some more work as mentioned in main.qml. Also I don't really like the visuals of the notification. Why is the text a link? I propose to use the same design as we want to do in filtering notifications (Figma). It would be great to replace the close icon with "sync" button, let's discuss it.

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 65781 dmg Expires: 24/06/2026 #6578
linux Build 📬 Mergin Maps 65891 x86_64 Expires: 24/06/2026 #6589
win64 Build 📬 Mergin Maps 57731 win64 Expires: 24/06/2026 #5773
Android Build 📬 Mergin Maps 789051 APK [arm64-v8a] Expires: 24/06/2026 #7890
Android Build 📬 Mergin Maps 789011 APK [armeabi-v7a] Expires: 24/06/2026 #7890
iOS Build 📬 Build number: 26.03.882911 #8829

Copy link
Copy Markdown
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

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

Besides the comments below, the project list shows information that user has "pending changes to synchronise" even though there are no changes done to the project locally, if there is newer version of project available on server. I don't think we want to show that info if there are no local changes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of passing MerginApi emit signal after project is reloaded and connect it to MerginApi::isProjectSyncNeeded()

MerginServerType::ServerType mServerType = MerginServerType::ServerType::OLD;
QString mServerDiagnosticLogsUrl = MerginApi::sDefaultReportLogUrl;


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for a new version of a project when it gets loaded

2 participants