feat: Emit notifications when an asset/collectible is hidden in the settings
- emit the signal from the backend - trigger the toast notification in QML - update the test(s) Fixes #12704
This commit is contained in:
parent
eaa8e90f11
commit
6f3a180f41
|
@ -6,6 +6,7 @@ import AppLayouts.Wallet.panels 1.0
|
||||||
|
|
||||||
import Storybook 1.0
|
import Storybook 1.0
|
||||||
import Models 1.0
|
import Models 1.0
|
||||||
|
import utils 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
@ -25,6 +26,12 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SignalSpy {
|
||||||
|
id: notificationSpy
|
||||||
|
target: Global
|
||||||
|
signalName: "displayToastMessage"
|
||||||
|
}
|
||||||
|
|
||||||
TestCase {
|
TestCase {
|
||||||
name: "ManageCollectiblesPanel"
|
name: "ManageCollectiblesPanel"
|
||||||
when: windowShown
|
when: windowShown
|
||||||
|
@ -65,6 +72,8 @@ Item {
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
controlUnderTest = createTemporaryObject(componentUnderTest, root)
|
controlUnderTest = createTemporaryObject(componentUnderTest, root)
|
||||||
|
controlUnderTest.clearSettings()
|
||||||
|
notificationSpy.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_showHideToken() {
|
function test_showHideToken() {
|
||||||
|
@ -82,9 +91,10 @@ Item {
|
||||||
const delegate0 = findChild(lvRegular, "manageTokensDelegate-0")
|
const delegate0 = findChild(lvRegular, "manageTokensDelegate-0")
|
||||||
verify(!!delegate0)
|
verify(!!delegate0)
|
||||||
const title = delegate0.title
|
const title = delegate0.title
|
||||||
|
tryCompare(notificationSpy, "count", 0)
|
||||||
triggerDelegateMenuAction(lvRegular, 0, "miHideToken")
|
triggerDelegateMenuAction(lvRegular, 0, "miHideToken")
|
||||||
|
// verify the signal to show the notification toast got fired
|
||||||
verify(controlUnderTest.dirty)
|
tryCompare(notificationSpy, "count", 1)
|
||||||
|
|
||||||
// verify we now have +1 hidden and -1 regular tokens after the "hide" operation
|
// verify we now have +1 hidden and -1 regular tokens after the "hide" operation
|
||||||
waitForItemPolished(lvHidden)
|
waitForItemPolished(lvHidden)
|
||||||
|
@ -107,8 +117,6 @@ Item {
|
||||||
verify(!!delegateN)
|
verify(!!delegateN)
|
||||||
const titleN = delegateN.title
|
const titleN = delegateN.title
|
||||||
compare(title, titleN)
|
compare(title, titleN)
|
||||||
|
|
||||||
verify(controlUnderTest.dirty)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_showHideCommunityGroup() {
|
function test_showHideCommunityGroup() {
|
||||||
|
@ -125,9 +133,10 @@ Item {
|
||||||
|
|
||||||
// verify we have 2 community collectible groups
|
// verify we have 2 community collectible groups
|
||||||
tryCompare(lvCommunityTokenGroups, "count", 3)
|
tryCompare(lvCommunityTokenGroups, "count", 3)
|
||||||
|
tryCompare(notificationSpy, "count", 0)
|
||||||
triggerDelegateMenuAction(lvCommunityTokenGroups, 0, "miHideTokenGroup", true)
|
triggerDelegateMenuAction(lvCommunityTokenGroups, 0, "miHideTokenGroup", true)
|
||||||
|
// verify the signal to show the notification toast got fired
|
||||||
verify(controlUnderTest.dirty)
|
tryCompare(notificationSpy, "count", 1)
|
||||||
|
|
||||||
// verify we have one less group
|
// verify we have one less group
|
||||||
waitForItemPolished(lvCommunityTokenGroups)
|
waitForItemPolished(lvCommunityTokenGroups)
|
||||||
|
@ -136,8 +145,6 @@ Item {
|
||||||
verify(!!lvHidden)
|
verify(!!lvHidden)
|
||||||
tryCompare(lvHidden, "count", 4) // we've just hidden 4 collectibles coming from this group
|
tryCompare(lvHidden, "count", 4) // we've just hidden 4 collectibles coming from this group
|
||||||
|
|
||||||
verify(controlUnderTest.dirty)
|
|
||||||
|
|
||||||
// verify hidden items are not draggable
|
// verify hidden items are not draggable
|
||||||
const hiddenToken = findChild(lvHidden, "manageTokensDelegate-0")
|
const hiddenToken = findChild(lvHidden, "manageTokensDelegate-0")
|
||||||
verify(!!hiddenToken)
|
verify(!!hiddenToken)
|
||||||
|
@ -152,21 +159,15 @@ Item {
|
||||||
waitForItemPolished(lvHidden)
|
waitForItemPolished(lvHidden)
|
||||||
triggerDelegateMenuAction(lvHidden, 0, "miShowToken")
|
triggerDelegateMenuAction(lvHidden, 0, "miShowToken")
|
||||||
|
|
||||||
verify(controlUnderTest.dirty)
|
|
||||||
|
|
||||||
// verify we again have 3 community groups, and one less hidden token
|
// verify we again have 3 community groups, and one less hidden token
|
||||||
tryCompare(lvCommunityTokenGroups, "count", 3)
|
tryCompare(lvCommunityTokenGroups, "count", 3)
|
||||||
tryCompare(lvHidden, "count", 3)
|
tryCompare(lvHidden, "count", 3)
|
||||||
|
|
||||||
verify(controlUnderTest.dirty)
|
|
||||||
|
|
||||||
// now mass show tokens from this group, verify we have 0 hidden tokens and 2 visible groups
|
// now mass show tokens from this group, verify we have 0 hidden tokens and 2 visible groups
|
||||||
triggerDelegateMenuAction(lvHidden, 0, "miShowTokenGroup")
|
triggerDelegateMenuAction(lvHidden, 0, "miShowTokenGroup")
|
||||||
waitForItemPolished(lvHidden)
|
waitForItemPolished(lvHidden)
|
||||||
tryCompare(lvHidden, "count", 0)
|
tryCompare(lvHidden, "count", 0)
|
||||||
tryCompare(lvCommunityTokenGroups, "count", 3)
|
tryCompare(lvCommunityTokenGroups, "count", 3)
|
||||||
|
|
||||||
verify(controlUnderTest.dirty)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_dnd() {
|
function test_dnd() {
|
||||||
|
@ -258,8 +259,10 @@ Item {
|
||||||
// find the 2385 delegate from the Bearz group and hide it
|
// find the 2385 delegate from the Bearz group and hide it
|
||||||
const bear2385DelegateIdx = findDelegateIndexWithTitle(bearzChildLV, "KILLABEAR #2385")
|
const bear2385DelegateIdx = findDelegateIndexWithTitle(bearzChildLV, "KILLABEAR #2385")
|
||||||
verify(bear2385DelegateIdx !== -1)
|
verify(bear2385DelegateIdx !== -1)
|
||||||
|
tryCompare(notificationSpy, "count", 0)
|
||||||
triggerDelegateMenuAction(bearzChildLV, bear2385DelegateIdx, "miHideCommunityToken")
|
triggerDelegateMenuAction(bearzChildLV, bear2385DelegateIdx, "miHideCommunityToken")
|
||||||
verify(controlUnderTest.dirty)
|
// verify the signal to show the notification toast got fired
|
||||||
|
tryCompare(notificationSpy, "count", 1)
|
||||||
|
|
||||||
// verify the hidden section now has 1 item and it's the one we just hid
|
// verify the hidden section now has 1 item and it's the one we just hid
|
||||||
const lvHidden = findChild(controlUnderTest, "lvHiddenTokens")
|
const lvHidden = findChild(controlUnderTest, "lvHiddenTokens")
|
||||||
|
@ -282,7 +285,8 @@ Item {
|
||||||
verify(!!pandasChildLV)
|
verify(!!pandasChildLV)
|
||||||
const panda909DelegateIdx = findDelegateIndexWithTitle(pandasChildLV, "Frenly Panda #909")
|
const panda909DelegateIdx = findDelegateIndexWithTitle(pandasChildLV, "Frenly Panda #909")
|
||||||
triggerDelegateMenuAction(pandasChildLV, panda909DelegateIdx, "miHideCommunityToken")
|
triggerDelegateMenuAction(pandasChildLV, panda909DelegateIdx, "miHideCommunityToken")
|
||||||
verify(controlUnderTest.dirty)
|
// verify the signal to show the notification toast got fired
|
||||||
|
tryCompare(notificationSpy, "count", 2)
|
||||||
|
|
||||||
// finally verify that the Bearz group is still at top
|
// finally verify that the Bearz group is still at top
|
||||||
waitForItemPolished(lvCommunityTokenGroups)
|
waitForItemPolished(lvCommunityTokenGroups)
|
||||||
|
|
|
@ -26,7 +26,7 @@ ManageTokensController::ManageTokensController(QObject* parent)
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
QElapsedTimer t;
|
QElapsedTimer t;
|
||||||
t.start();
|
t.start();
|
||||||
qCInfo(manageTokens) << "!!! ADDING" << last-first+1 << "NEW TOKENS";
|
qCDebug(manageTokens) << "!!! ADDING" << last-first+1 << "NEW TOKENS";
|
||||||
#endif
|
#endif
|
||||||
for (int i = first; i <= last; i++)
|
for (int i = first; i <= last; i++)
|
||||||
addItem(i);
|
addItem(i);
|
||||||
|
@ -36,7 +36,7 @@ ManageTokensController::ManageTokensController(QObject* parent)
|
||||||
rebuildCommunityTokenGroupsModel();
|
rebuildCommunityTokenGroupsModel();
|
||||||
rebuildRegularTokenGroupsModel();
|
rebuildRegularTokenGroupsModel();
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
qCInfo(manageTokens) << "!!! ADDING NEW SOURCE DATA TOOK" << t.nsecsElapsed()/1'000'000.f << "ms";
|
qCDebug(manageTokens) << "!!! ADDING NEW SOURCE DATA TOOK" << t.nsecsElapsed()/1'000'000.f << "ms";
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
connect(m_sourceModel, &QAbstractItemModel::rowsRemoved, this, &ManageTokensController::parseSourceModel);
|
connect(m_sourceModel, &QAbstractItemModel::rowsRemoved, this, &ManageTokensController::parseSourceModel);
|
||||||
|
@ -50,7 +50,6 @@ ManageTokensController::ManageTokensController(QObject* parent)
|
||||||
});
|
});
|
||||||
connect(m_communityTokenGroupsModel, &ManageTokensModel::rowsMoved, this, [this](const QModelIndex &parent, int start, int end, const QModelIndex &destination, int toRow) {
|
connect(m_communityTokenGroupsModel, &ManageTokensModel::rowsMoved, this, [this](const QModelIndex &parent, int start, int end, const QModelIndex &destination, int toRow) {
|
||||||
qCDebug(manageTokens) << "!!! GROUP MOVED FROM" << start << "TO" << toRow;
|
qCDebug(manageTokens) << "!!! GROUP MOVED FROM" << start << "TO" << toRow;
|
||||||
// FIXME swap toRow<->start instead of reloadCommunityIds()?
|
|
||||||
reloadCommunityIds();
|
reloadCommunityIds();
|
||||||
m_communityTokensModel->setCommunityIds(m_communityIds);
|
m_communityTokensModel->setCommunityIds(m_communityIds);
|
||||||
m_communityTokensModel->saveCustomSortOrder();
|
m_communityTokensModel->saveCustomSortOrder();
|
||||||
|
@ -64,12 +63,16 @@ void ManageTokensController::showHideRegularToken(int row, bool flag)
|
||||||
{
|
{
|
||||||
if (flag) { // show
|
if (flag) { // show
|
||||||
auto hiddenItem = m_hiddenTokensModel->takeItem(row);
|
auto hiddenItem = m_hiddenTokensModel->takeItem(row);
|
||||||
if (hiddenItem)
|
if (hiddenItem) {
|
||||||
m_regularTokensModel->addItem(*hiddenItem);
|
m_regularTokensModel->addItem(*hiddenItem);
|
||||||
|
emit tokenShown(hiddenItem->symbol, hiddenItem->name);
|
||||||
|
}
|
||||||
} else { // hide
|
} else { // hide
|
||||||
auto shownItem = m_regularTokensModel->takeItem(row);
|
auto shownItem = m_regularTokensModel->takeItem(row);
|
||||||
if (shownItem)
|
if (shownItem) {
|
||||||
m_hiddenTokensModel->addItem(*shownItem, false /*prepend*/);
|
m_hiddenTokensModel->addItem(*shownItem, false /*prepend*/);
|
||||||
|
emit tokenHidden(shownItem->symbol, shownItem->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +84,7 @@ void ManageTokensController::showHideCommunityToken(int row, bool flag)
|
||||||
m_communityTokensModel->addItem(*hiddenItem);
|
m_communityTokensModel->addItem(*hiddenItem);
|
||||||
if (!m_communityIds.contains(hiddenItem->communityId))
|
if (!m_communityIds.contains(hiddenItem->communityId))
|
||||||
m_communityIds.append(hiddenItem->communityId);
|
m_communityIds.append(hiddenItem->communityId);
|
||||||
|
emit tokenShown(hiddenItem->symbol, hiddenItem->name);
|
||||||
}
|
}
|
||||||
} else { // hide
|
} else { // hide
|
||||||
auto shownItem = m_communityTokensModel->takeItem(row);
|
auto shownItem = m_communityTokensModel->takeItem(row);
|
||||||
|
@ -88,6 +92,7 @@ void ManageTokensController::showHideCommunityToken(int row, bool flag)
|
||||||
m_hiddenTokensModel->addItem(*shownItem, false /*prepend*/);
|
m_hiddenTokensModel->addItem(*shownItem, false /*prepend*/);
|
||||||
if (!m_communityTokensModel->hasCommunityIdToken(shownItem->communityId))
|
if (!m_communityTokensModel->hasCommunityIdToken(shownItem->communityId))
|
||||||
m_communityIds.removeAll(shownItem->communityId);
|
m_communityIds.removeAll(shownItem->communityId);
|
||||||
|
emit tokenHidden(shownItem->symbol, shownItem->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_communityTokensModel->setCommunityIds(m_communityIds);
|
m_communityTokensModel->setCommunityIds(m_communityIds);
|
||||||
|
@ -99,15 +104,21 @@ void ManageTokensController::showHideGroup(const QString& groupId, bool flag)
|
||||||
{
|
{
|
||||||
if (flag) { // show
|
if (flag) { // show
|
||||||
const auto tokens = m_hiddenTokensModel->takeAllItems(groupId);
|
const auto tokens = m_hiddenTokensModel->takeAllItems(groupId);
|
||||||
|
if (!tokens.isEmpty()) {
|
||||||
for (const auto& token: tokens) {
|
for (const auto& token: tokens) {
|
||||||
m_communityTokensModel->addItem(token);
|
m_communityTokensModel->addItem(token);
|
||||||
}
|
}
|
||||||
|
emit communityTokenGroupShown(tokens.constFirst().communityName);
|
||||||
|
}
|
||||||
m_communityIds.append(groupId);
|
m_communityIds.append(groupId);
|
||||||
} else { // hide
|
} else { // hide
|
||||||
const auto tokens = m_communityTokensModel->takeAllItems(groupId);
|
const auto tokens = m_communityTokensModel->takeAllItems(groupId);
|
||||||
|
if (!tokens.isEmpty()) {
|
||||||
for (const auto& token: tokens) {
|
for (const auto& token: tokens) {
|
||||||
m_hiddenTokensModel->addItem(token, false /*prepend*/);
|
m_hiddenTokensModel->addItem(token, false /*prepend*/);
|
||||||
}
|
}
|
||||||
|
emit communityTokenGroupHidden(tokens.constFirst().communityName);
|
||||||
|
}
|
||||||
m_communityIds.removeAll(groupId);
|
m_communityIds.removeAll(groupId);
|
||||||
}
|
}
|
||||||
m_communityTokensModel->setCommunityIds(m_communityIds);
|
m_communityTokensModel->setCommunityIds(m_communityIds);
|
||||||
|
@ -228,7 +239,7 @@ void ManageTokensController::settingsHideToken(const QString& symbol)
|
||||||
m_settingsData.remove(symbol); // remove all
|
m_settingsData.remove(symbol); // remove all
|
||||||
m_settingsData.insert(symbol, {pos, false, group});
|
m_settingsData.insert(symbol, {pos, false, group});
|
||||||
} else {
|
} else {
|
||||||
m_settingsData.insert(symbol, {0, false, QString()});
|
m_settingsData.insert(symbol, {0, false, {}});
|
||||||
}
|
}
|
||||||
|
|
||||||
saveSettings(true);
|
saveSettings(true);
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ManageTokensController : public QObject, public QQmlParserStatus
|
||||||
// input properties
|
// input properties
|
||||||
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged FINAL)
|
Q_PROPERTY(QAbstractItemModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged FINAL)
|
||||||
Q_PROPERTY(QString settingsKey READ settingsKey WRITE setSettingsKey NOTIFY settingsKeyChanged FINAL REQUIRED)
|
Q_PROPERTY(QString settingsKey READ settingsKey WRITE setSettingsKey NOTIFY settingsKeyChanged FINAL REQUIRED)
|
||||||
Q_PROPERTY(bool arrangeByCommunity READ arrangeByCommunity WRITE setArrangeByCommunity NOTIFY arrangeByCommunityChanged FINAL) // TODO persist in settings
|
Q_PROPERTY(bool arrangeByCommunity READ arrangeByCommunity WRITE setArrangeByCommunity NOTIFY arrangeByCommunityChanged FINAL) // TODO persist in settings?
|
||||||
// TODO arrangeByCollection for collectibles
|
// TODO arrangeByCollection for collectibles
|
||||||
|
|
||||||
// output properties
|
// output properties
|
||||||
|
@ -58,6 +58,12 @@ signals:
|
||||||
void settingsKeyChanged();
|
void settingsKeyChanged();
|
||||||
void settingsDirtyChanged(bool dirty);
|
void settingsDirtyChanged(bool dirty);
|
||||||
|
|
||||||
|
void tokenHidden(const QString& symbol, const QString& name);
|
||||||
|
void tokenShown(const QString& symbol, const QString& name);
|
||||||
|
void communityTokenGroupHidden(const QString& communityName);
|
||||||
|
void communityTokenGroupShown(const QString& communityName);
|
||||||
|
// TODO collectionTokenGroupHidden(const QString& collectionName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QAbstractItemModel* m_sourceModel{nullptr};
|
QAbstractItemModel* m_sourceModel{nullptr};
|
||||||
QAbstractItemModel* sourceModel() const { return m_sourceModel; }
|
QAbstractItemModel* sourceModel() const { return m_sourceModel; }
|
||||||
|
|
|
@ -36,7 +36,6 @@ void ManageTokensModel::addItem(const TokenData& item, bool append)
|
||||||
beginInsertRows({}, destRow, destRow);
|
beginInsertRows({}, destRow, destRow);
|
||||||
append ? m_data.append(item) : m_data.prepend(item);
|
append ? m_data.append(item) : m_data.prepend(item);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
setDirty(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<TokenData> ManageTokensModel::takeItem(int row)
|
std::optional<TokenData> ManageTokensModel::takeItem(int row)
|
||||||
|
@ -47,7 +46,6 @@ std::optional<TokenData> ManageTokensModel::takeItem(int row)
|
||||||
beginRemoveRows({}, row, row);
|
beginRemoveRows({}, row, row);
|
||||||
auto res = m_data.takeAt(row);
|
auto res = m_data.takeAt(row);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
setDirty(true);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +70,6 @@ QList<TokenData> ManageTokensModel::takeAllItems(const QString& communityId)
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
setDirty(true);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,9 +94,17 @@ DropArea {
|
||||||
isCommunityAsset: !!model.communityId
|
isCommunityAsset: !!model.communityId
|
||||||
isCollectible: root.isCollectible
|
isCollectible: root.isCollectible
|
||||||
onMoveRequested: (from, to) => root.ListView.view.model.moveItem(from, to)
|
onMoveRequested: (from, to) => root.ListView.view.model.moveItem(from, to)
|
||||||
onShowHideRequested: (index, flag) => isCommunityAsset ? root.controller.showHideCommunityToken(index, flag)
|
onShowHideRequested: function(index, flag) {
|
||||||
: root.controller.showHideRegularToken(index, flag)
|
if (isCommunityAsset)
|
||||||
onShowHideGroupRequested: (groupId, flag) => root.controller.showHideGroup(groupId, flag)
|
root.controller.showHideCommunityToken(index, flag)
|
||||||
|
else
|
||||||
|
root.controller.showHideRegularToken(index, flag)
|
||||||
|
root.controller.saveSettings()
|
||||||
|
}
|
||||||
|
onShowHideGroupRequested: function(groupId, flag) {
|
||||||
|
root.controller.showHideGroup(groupId, flag)
|
||||||
|
root.controller.saveSettings()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,10 @@ DropArea {
|
||||||
isCollectible: root.isCollectible
|
isCollectible: root.isCollectible
|
||||||
groupId: model.communityId
|
groupId: model.communityId
|
||||||
onMoveRequested: (from, to) => root.controller.communityTokenGroupsModel.moveItem(from, to) // TODO collection
|
onMoveRequested: (from, to) => root.controller.communityTokenGroupsModel.moveItem(from, to) // TODO collection
|
||||||
onShowHideGroupRequested: (groupId, flag) => root.controller.showHideGroup(groupId, flag)
|
onShowHideGroupRequested: function(groupId, flag) {
|
||||||
|
root.controller.showHideGroup(groupId, flag)
|
||||||
|
root.controller.saveSettings()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,12 @@ Control {
|
||||||
sourceModel: root.baseModel
|
sourceModel: root.baseModel
|
||||||
arrangeByCommunity: switchArrangeByCommunity.checked
|
arrangeByCommunity: switchArrangeByCommunity.checked
|
||||||
settingsKey: "WalletAssets"
|
settingsKey: "WalletAssets"
|
||||||
|
onTokenHidden: (symbol, name) => Global.displayToastMessage(
|
||||||
|
qsTr("%1 (%2) was successfully hidden.").arg(name).arg(symbol), "", "checkmark-circle",
|
||||||
|
false, Constants.ephemeralNotificationType.success, "")
|
||||||
|
onCommunityTokenGroupHidden: (communityName) => Global.displayToastMessage(
|
||||||
|
qsTr("%1 community assets successfully hidden").arg(communityName), "", "checkmark-circle",
|
||||||
|
false, Constants.ephemeralNotificationType.success, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,12 @@ Control {
|
||||||
sourceModel: d.renamedModel
|
sourceModel: d.renamedModel
|
||||||
arrangeByCommunity: switchArrangeByCommunity.checked
|
arrangeByCommunity: switchArrangeByCommunity.checked
|
||||||
settingsKey: "WalletCollectibles"
|
settingsKey: "WalletCollectibles"
|
||||||
|
onTokenHidden: (symbol, name) => Global.displayToastMessage(
|
||||||
|
qsTr("%1 was successfully hidden.").arg(name), "", "checkmark-circle",
|
||||||
|
false, Constants.ephemeralNotificationType.success, "")
|
||||||
|
onCommunityTokenGroupHidden: (communityName) => Global.displayToastMessage(
|
||||||
|
qsTr("%1 community collectibles successfully hidden").arg(communityName), "", "checkmark-circle",
|
||||||
|
false, Constants.ephemeralNotificationType.success, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue