Skip to content

Commit

Permalink
wip-iss3403 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed May 22, 2024
1 parent baf5c4c commit 2078927
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions app/synchronizationmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SynchronizationManager::SynchronizationManager(
QObject::connect( mMerginApi, &MerginApi::pushCanceled, this, &SynchronizationManager::onProjectSyncCanceled );
QObject::connect( mMerginApi, &MerginApi::syncProjectFinished, this, &SynchronizationManager::onProjectSyncFinished );
QObject::connect( mMerginApi, &MerginApi::networkErrorOccurred, this, &SynchronizationManager::onProjectSyncFailure );
QObject::connect( mMerginApi, &MerginApi::projectCreated, this, &SynchronizationManager::onProjectCreated );
QObject::connect( mMerginApi, &MerginApi::projectAttachedToMergin, this, &SynchronizationManager::onProjectAttachedToMergin );
QObject::connect( mMerginApi, &MerginApi::syncProjectStatusChanged, this, &SynchronizationManager::onProjectSyncProgressChanged );
QObject::connect( mMerginApi, &MerginApi::projectReloadNeededAfterSync, this, &SynchronizationManager::onProjectReloadNeededAfterSync );
Expand Down Expand Up @@ -230,6 +231,24 @@ void SynchronizationManager::onProjectSyncProgressChanged( const QString &projec

}

void SynchronizationManager::onProjectCreated(const QString &projectFullName, bool result)
{
if (!result)
{
qDebug() << "Project creation result is false for:" << projectFullName; // Debug statement
//qDebug() << "mSyncProcesses" << mSyncProcesses;
if (mSyncProcesses.contains(projectFullName))
{
qDebug() << "Removing project from sync processes:" << projectFullName; // Debug statement
mSyncProcesses.remove(projectFullName);
}
}
else
{
qDebug() << "Project creation result is true for:" << projectFullName; // Debug statement
}
}

void SynchronizationManager::onProjectSyncFailure(
const QString &message,
const QString &topic,
Expand Down
1 change: 1 addition & 0 deletions app/synchronizationmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class SynchronizationManager : public QObject
void onProjectSyncFailure( const QString &message, const QString &topic, int httpCode, const QString &projectFullName );
void onProjectAttachedToMergin( const QString &projectFullName, const QString &previousName );
void onProjectReloadNeededAfterSync( const QString &projectFullName );
void onProjectCreated(const QString &projectName, bool result);

private:

Expand Down
2 changes: 1 addition & 1 deletion core/merginapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ void MerginApi::createProjectFinished()

CoreUtils::log( "create " + projectFullName, message );

emit projectCreated( projectFullName, false );
emit projectCreated( projectName, false );

if ( showLimitReachedDialog )
{
Expand Down

1 comment on commit 2078927

@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 24.5.622811 just submitted!

Please sign in to comment.