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

Delete old code that's not necessary #2515

Open
taoeffect opened this issue Jan 17, 2025 · 0 comments · May be fixed by #2525
Open

Delete old code that's not necessary #2515

taoeffect opened this issue Jan 17, 2025 · 0 comments · May be fixed by #2525
Assignees
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Priority:High

Comments

@taoeffect
Copy link
Member

Problem

There's some code we don't need after we wipe everything.

E.g. from #2514:

  // For compatibility for old contracts.
  // TODO: This is to be deleted in a later release, once contracts are recreated.
  'state/vuex/commit': (key, data) => {
    switch (key) {
      case 'deleteChatRoomScrollPosition':
      case 'setChatRoomScrollPosition':
        return sbp('okTurtles.events/emit', NEW_CHATROOM_UNREAD_POSITION, data)
      // These are handled by events
      case 'removeNotification':
        return
      case 'setCurrentChatRoomId':
        return
    }

    throw new Error('Invalid selector `state/vuex/commit`: Not allowed in SW.')
  }

There might be some other code in the project we won't need anymore for the "Final breaking changes" milestone.

Solution

Remove this code. For some of the old code, e.g. upgrade code, it would be better to comment it out instead of removing it, as it will remain as a useful example for when we need to perform upgrades again.

@taoeffect taoeffect added App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Priority:High labels Jan 17, 2025
@taoeffect taoeffect added this to the Final breaking changes milestone Jan 17, 2025
@corrideat corrideat marked this as a duplicate of #2523 Jan 19, 2025
corrideat added a commit that referenced this issue Jan 19, 2025
corrideat added a commit that referenced this issue Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Priority:High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants