FAForever/downlords-faf-client

[Bug]: always opens #russian chat tab

adminxp opened this issue · 4 comments

Describe the Bug

always opens #russian chat tab even if it is removed from autojoin channels.
faf client ignores settings and if you have russian IP opens extra chat tab regardless of settings u make

Log file or Error Message

1

Reproduce the bug

1

Expected Behavior

it should not open any extra chat tabs and follow user's settings

Screenshots

No response

Additional context

No response

Which Operating System are you using?

Windows

@adminxp
is it still going on? Are you sure it is also related to russian IP?
I tried to add chat channel(to settings) -> closed client -> opened .. chat (it was tthere) -> removed the channel -> closed client -> opened again ... the removed chat was not opened.

It partially has to do with if the user has their os language set to russian I believe or if their IP is russian

@adminxp is it still going on? Are you sure it is also related to russian IP? I tried to add chat channel(to settings) -> closed client -> opened .. chat (it was tthere) -> removed the channel -> closed client -> opened again ... the removed chat was not opened.

FAF always opens Russian tab for me and have been opening it since its been initially made. Faf client does not follow settings to remove it from autojoin. I don't know how it works from IP or from OS language but it should follow settings in client. I have been waiting for years that it will be fixed...

I don't find this behavior as a bug, but rather as feature, at least it looks intentionally implemented this way.

As far as I see, it uses the JVM/Operating System locale settings and checks it against hardcoded map of locales >> language chat channels. If the locale is in the map, you get auto-joined to the respective channel. IP address has nothing to do here.

This behavior is not influenced by the client.prefs (user controlled settings) since its in the default constructor of the ChatPrefs class.
See: https://github.com/FAForever/downlords-faf-client/blob/develop/src/main/java/com/faforever/client/preferences/ChatPrefs.java#L57

Maybe additional setting can be added, to enable/disable this auto-join by locale ?

P.S. Speaking of bugs, a potential bug can be this code here: https://github.com/FAForever/downlords-faf-client/blob/develop/src/main/java/com/faforever/client/i18n/I18n.java#L44

Since the Locale.setDefault in I18n I believe is called after the Locale.getDefault in ChatPrefs, you cannot influence the auto-join based on locale, specified in the settings, but rather always the OS one gets picked in ChatPrefs, but that is nitpicking 😁 😁