Skip to content

Commit

Permalink
[nemo-systemsettings] Fix apgs pending agreement update. Fixes JB#48765
Browse files Browse the repository at this point in the history
Setting location mode and then accepting the agreement wasn't
removing it from the pending list.
  • Loading branch information
pvuorela committed Jan 31, 2020
1 parent 498d326 commit 6fa9714
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/locationsettings.cpp
Expand Up @@ -288,9 +288,14 @@ bool LocationSettingsPrivate::updateProvider(const QString &name, const Location
m_pendingAgreements.removeOne(name);
emit q->pendingAgreementsChanged();
}
} else if (provider.hasAgreement && !provider.agreementAccepted && !m_pendingAgreements.contains(name)) {
m_pendingAgreements.append(name);
emit q->pendingAgreementsChanged();
} else if (provider.hasAgreement) {
if (!provider.agreementAccepted && !m_pendingAgreements.contains(name)) {
m_pendingAgreements.append(name);
emit q->pendingAgreementsChanged();
} else if (provider.agreementAccepted && m_pendingAgreements.contains(name)) {
m_pendingAgreements.removeOne(name);
emit q->pendingAgreementsChanged();
}
}
}

Expand Down

0 comments on commit 6fa9714

Please sign in to comment.