Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: hiddenActivityBanners #1060

Merged
merged 8 commits into from
Nov 7, 2024
Merged

Conversation

borislav-itskov
Copy link
Member

Add: hiddenActivityBanners to activity.ts to allow for manually hiding the activity banner

This is the main change:

// do not show a banner for forcefully hidden banners
this.broadcastedButNotConfirmed
.filter(
  (op) =>
    !this.#hiddenActivityBanners.includes(
      `${op.accountAddr}-${op.networkId}-${op.timestamp}`
    )
)
...

Comment on lines 516 to 519
/* eslint-disable @typescript-eslint/no-floating-promises */
this.#storage.set('hiddenActivityBanners', this.#hiddenActivityBanners)

this.emitUpdate()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can call emitUpdate and await storage set afterwards

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but I don't understand why should we do that? For example, in removeAccountData, we do the same as here: no awaits, first setting the storage and only after that updating

src/interfaces/banner.ts Outdated Show resolved Hide resolved
src/controllers/activity/activity.ts Outdated Show resolved Hide resolved
@borislav-itskov borislav-itskov merged commit 235aec9 into v2 Nov 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants