Skip to content

Commit

Permalink
post review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Jan 13, 2025
1 parent 493bb18 commit 4a6deda
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
9 changes: 8 additions & 1 deletion app/activeproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ ActiveProject::ActiveProject( AppSettings &appSettings
setProjectRole( role );
}
} );

QObject::connect(
mMerginApi,
&MerginApi::authChanged,
this,
&ActiveProject::updateUserRoleInActiveProject
);
}

ActiveProject::~ActiveProject() = default;
Expand Down Expand Up @@ -585,6 +592,6 @@ void ActiveProject::setProjectRole( const QString &role )

void ActiveProject::updateUserRoleInActiveProject()
{
// update user's role each time a project is opened, following #3174
// update user's role each time a project is opened or auth changes, following #3174
mMerginApi->updateProjectMetadataRole( projectFullName() );
}
2 changes: 1 addition & 1 deletion app/activeproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ActiveProject: public QObject
/**
* Calls Mergin API to update current project’s role
*/
void updateUserRoleInActiveProject();
Q_INVOKABLE void updateUserRoleInActiveProject();

signals:
void qgsProjectChanged();
Expand Down
2 changes: 0 additions & 2 deletions app/qml/project/MMProjectController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ Item {
function setupProjectOpen( projectPath ) {
if ( projectPath === __activeProject.localProject.qgisProjectFilePath )
{
// update user's role in project ( in case user has changed )
__activeProject.updateUserRoleInActiveProject()
// just hide the panel - project already loaded
hidePanel()
}
Expand Down
1 change: 0 additions & 1 deletion core/merginprojectmetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ struct MerginProjectMetadata
QString name;
QString projectNamespace;
QString role;
QList<QString> writersnames;
int version = -1;
QList<MerginFile> files;
QString projectId; //!< unique project ID (only available in API that supports project IDs)
Expand Down

1 comment on commit 4a6deda

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

iOS - version 25.1.698011 just submitted!

Please sign in to comment.