fix(token-order): global has settings check that introduced side effects
The "settings exist" done via ManageTokensController::hasSettings() was using the global store, hence not working user based. Therefore, after an onboarding the previous user's settings presence was taken into account. The fix now uses the order data that is loaded externally per user. Closes #14383
This commit is contained in:
parent
228622359d
commit
8be1453fd0
|
@ -276,9 +276,7 @@ QString ManageTokensController::settingsGroupName() const
|
||||||
|
|
||||||
bool ManageTokensController::hasSettings() const
|
bool ManageTokensController::hasSettings() const
|
||||||
{
|
{
|
||||||
Q_ASSERT(!m_settingsKey.isEmpty());
|
return !m_settingsData.isEmpty();
|
||||||
const auto groups = m_settings.childGroups();
|
|
||||||
return groups.contains(settingsGroupName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ManageTokensController::compareTokens(const QString& lhsSymbol, const QString& rhsSymbol) const
|
int ManageTokensController::compareTokens(const QString& lhsSymbol, const QString& rhsSymbol) const
|
||||||
|
|
|
@ -160,7 +160,7 @@ private:
|
||||||
void setSerializeAsCollectibles(const bool newSerializeAsCollectibles);
|
void setSerializeAsCollectibles(const bool newSerializeAsCollectibles);
|
||||||
|
|
||||||
QSettings m_settings;
|
QSettings m_settings;
|
||||||
SerializedTokenData m_settingsData; // symbol -> {sortOrder, visible, groupId, isCommunityGroup, isCollectionGroup}
|
SerializedTokenData m_settingsData;
|
||||||
bool hasSettings() const;
|
bool hasSettings() const;
|
||||||
void loadSettingsData(bool withGroup = false);
|
void loadSettingsData(bool withGroup = false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue