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
|
||||
{
|
||||
Q_ASSERT(!m_settingsKey.isEmpty());
|
||||
const auto groups = m_settings.childGroups();
|
||||
return groups.contains(settingsGroupName());
|
||||
return !m_settingsData.isEmpty();
|
||||
}
|
||||
|
||||
int ManageTokensController::compareTokens(const QString& lhsSymbol, const QString& rhsSymbol) const
|
||||
|
|
|
@ -160,7 +160,7 @@ private:
|
|||
void setSerializeAsCollectibles(const bool newSerializeAsCollectibles);
|
||||
|
||||
QSettings m_settings;
|
||||
SerializedTokenData m_settingsData; // symbol -> {sortOrder, visible, groupId, isCommunityGroup, isCollectionGroup}
|
||||
SerializedTokenData m_settingsData;
|
||||
bool hasSettings() const;
|
||||
void loadSettingsData(bool withGroup = false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue