Skip to content

Commit

Permalink
feat: revert remove on commandManager
Browse files Browse the repository at this point in the history
This change included the potential to break the indexing system of Nexus which currently doesn't support removing of indexes. As this would inherently introduce a breaking change among bots that uses persistent indexes, it's decided to remove it instead
  • Loading branch information
ShindouMihou committed Oct 6, 2023
1 parent cf482f8 commit ce64bc0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ class NexusCommandManagerCore internal constructor() : NexusCommandManager {
return this
}

override fun remove(command: NexusCommand): NexusCommandManager {
removeContextMenu(command.uuid)
return this
}

override fun remove(contextMenu: NexusContextMenu): NexusCommandManager {
removeContextMenu(contextMenu.uuid)
return this
}

override operator fun get(applicationId: Long): NexusCommand? = indexStore[applicationId]?.takeCommand()
override operator fun get(uuid: String): NexusCommand? = commandsDelegate[uuid]
override operator fun get(name: String, server: Long?): NexusCommand? {
Expand Down Expand Up @@ -95,14 +85,6 @@ class NexusCommandManagerCore internal constructor() : NexusCommandManager {
}
}

override fun removeContextMenu(uuid: String) {
contextMenusDelegate.remove(uuid)
}

override fun removeSlashCommand(uuid: String) {
commandsDelegate.remove(uuid)
}

override fun export(): List<NexusMetaIndex> {
return indexStore.all()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ interface NexusCommandManager {
fun add(command: NexusCommand): NexusCommandManager
fun add(contextMenu: NexusContextMenu): NexusCommandManager

fun remove(command: NexusCommand): NexusCommandManager
fun remove(contextMenu: NexusContextMenu): NexusCommandManager

operator fun get(applicationId: Long): NexusCommand?
operator fun get(uuid: String): NexusCommand?
operator fun get(name: String, server: Long? = null): NexusCommand?
Expand All @@ -151,9 +148,6 @@ interface NexusCommandManager {
fun getContextMenu(uuid: String): NexusContextMenu?
fun getContextMenu(name: String, kind: ContextMenuKinds, server: Long? = null): NexusContextMenu?

fun removeContextMenu(uuid: String)
fun removeSlashCommand(uuid: String)

/**
* Exports the indexes that was created which can then be used to create a database copy of the given indexes.
* <br></br><br></br>
Expand Down

0 comments on commit ce64bc0

Please sign in to comment.