8000 feat: Temporary pin discord version by joamoncab · Pull Request #32 · revenge-mod/revenge-manager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Temporary pin discord version #32

New issue
8000

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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

joamoncab
Copy link

As we already know, revenge is broken on versions newer than 288 (https://discord.com/channels/1205207689832038522/1205211627629191288/1390020789561983046), so this patch limits the manager on the latest working version for all three channels.

8000

@Ushie
Copy link
Ushie commented Jul 10, 2025

Once Revenge starts fixing versions then channel selection should no longer be an option, please always return the stable channel value

If a user is on alpha or anything they already have to reinstall to downgrade to any of these versions listed here

@Ushie
Copy link
Ushie commented Jul 10, 2025

If possible, comment out the channel selection from settings and see if the value is used anywhere relevant, if it is then keep it for now and set it on init to stable

@joamoncab
Copy link
Author

I have done what you said. I consider the code to be more future proof with changing the prefs.channel value to a static STABLE instead of changing every single reference to it. Please let me know if I missed/misunderstood anything

@joamoncab
Copy link
Author

I have made this commit as well in an attempt to improve user experience by invalidating custom version set through developer settings, so they aren't required to change it manually. Furthermore, any non stable code won't be accepted

type
)
//force stable channel
if (type != Type.STABLE) return@with null
Copy link

Choose a reason for hiding this comment

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

Why do an if here at all if there's only one possible channel? if you're expecting the channel to possibly be different then that's something to look into

Copy link
Author

Choose a reason for hiding this comment

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

I'm expecting it to possibly be different on users that update the manager and have a custom version set in developer settings

//force stable channel
if (type != Type.STABLE) return@with null
// maintain version below 288
if (287 < toInt() / 1000)
Copy link

Choose a reason for hiding this comment

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

What's the purpose of this and the else calculation below? aren't we setting a versionCode that we know is working?

Copy link
Author

Choose a reason for hiding this comment

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

The calculation below allows for downgrading while not allowing upgrading, so users can downgrade if they wish to but not to go above a broken version

@@ -24,6 +25,7 @@ data class DiscordVersion(
fun toVersionCode() = "$major${type.ordinal}${if (minor < 10) 0 else ""}${minor}"

companion object {
const val LATEST = "287013"
Copy link

Choose a reason for hiding this comment

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

Maybe this value can be set from an environment variable for the time being until Revenge sets up a domain where the version fixing can be done on

Copy link
Author

Choose a reason for hiding this comment

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

I agree

Copy link
Author

Choose a reason for hiding this comment

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

Maybe we could set up a pseudo API that pulls the version from a JSON in the repo

Copy link

Choose a reason for hiding this comment

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

This is only a temporary solution until Revenge gets a domain that allows it to do that, for now this is good enough

version.isNotBlank() -> DiscordVersion.fromVersionCode(version).toString()
version.isNotBlank() -> (DiscordVersion.fromVersionCode(version)?.toString() ?: run {
version = DiscordVersion.LATEST
DiscordVersion.fromVersionCode(DiscordVersion.LATEST).toString()
Copy link

Choose a reason for hiding this comment

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

Instead of doing this calculation everywhere, you can make the LATEST have both version name and version code values

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I'll make a commit soom

@@ -74,7 +74,7 @@ class HomeScreen : Screen {
remember(prefs.discordVersion, viewModel.discordVersions, prefs.channel) {
when {
prefs.discordVersion.isBlank() -> viewModel.discordVersions?.get(prefs.channel)
else -> DiscordVersion.fromVersionCode(prefs.discordVersion)
else -> (DiscordVersion.fromVersionCode(prefs.discordVersion) ?: DiscordVersion.fromVersionCode(DiscordVersion.LATEST))
Copy link

Choose a reason for hiding this comment

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

Refer to review below

Copy link
Author

Choose a reason for hiding this comment

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

i can not set a plain string to this since a lot of variables require a DiscordVersion object, and fixing that would require a lot of rewrites. The other commit will be up soon

rscFile.replace("_$postfix.xml", ".xml")
}
}*/
Copy link

Choose a reason for hiding this comment

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

What are the changes in these files accomplishing?

Copy link
Author

Choose a reason for hiding this comment

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

Removing the support for anything other than Stable versions, but I get your point

@Ushie Ushie changed the title feat(versions): limit versions on manager feat: Temporary pin discord version Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0