Skip to content

Commit

Permalink
Allow access to IsFirstSyncDialogShown flag from the cloud extension
Browse files Browse the repository at this point in the history
  • Loading branch information
crsib committed Apr 11, 2024
1 parent 977c671 commit e2c9048
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions libraries/lib-cloud-audiocom/sync/ProjectCloudExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,26 @@ ProjectSyncStatus ProjectCloudExtension::GetCurrentSyncStatus() const
return mLastStatus.Status;
}

bool ProjectCloudExtension::IsFirstSyncDialogShown() const
{
auto lock = std::lock_guard { mIdentifiersMutex };

if (mProjectId.empty())
return false;

return CloudProjectsDatabase::Get().IsFirstSyncDialogShown(mProjectId);
}

void ProjectCloudExtension::SetFirstSyncDialogShown(bool shown)
{
auto lock = std::lock_guard { mIdentifiersMutex };

if (mProjectId.empty())
return;

CloudProjectsDatabase::Get().SetFirstSyncDialogShown(mProjectId, shown);
}

bool CloudStatusChangedMessage::IsSyncing() const noexcept
{
return Status == ProjectSyncStatus::Syncing;
Expand Down
3 changes: 3 additions & 0 deletions libraries/lib-cloud-audiocom/sync/ProjectCloudExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ class CLOUD_AUDIOCOM_API ProjectCloudExtension final : public ClientData::Base

ProjectSyncStatus GetCurrentSyncStatus() const;

bool IsFirstSyncDialogShown() const;
void SetFirstSyncDialogShown(bool shown = true);

private:
struct UploadQueueElement;
struct CloudStatusChangedNotifier;
Expand Down

0 comments on commit e2c9048

Please sign in to comment.