Skip to content

Commit fc479bf

Browse files
committed
Remove download request screen
1 parent 2502b71 commit fc479bf

File tree

4 files changed

+2
-84
lines changed

4 files changed

+2
-84
lines changed

src/main/kotlin/xyz/bluspring/unitytranslate/client/UnityTranslateClient.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,21 +256,5 @@ class UnityTranslateClient {
256256
}
257257

258258
private val queuedForJoin = ConcurrentLinkedQueue<Consumer<Minecraft>>()
259-
260-
fun openDownloadRequest() {
261-
queuedForJoin.add { mc ->
262-
if (mc.screen is OpenBrowserScreen) {
263-
mc.execute {
264-
mc.setScreen(RequestDownloadScreen().apply {
265-
parent = mc.screen
266-
})
267-
}
268-
} else {
269-
mc.execute {
270-
mc.setScreen(RequestDownloadScreen())
271-
}
272-
}
273-
}
274-
}
275259
}
276260
}

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/RequestDownloadScreen.kt

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/main/kotlin/xyz/bluspring/unitytranslate/client/transcribers/browser/BrowserSpeechTranscriber.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import xyz.bluspring.unitytranslate.Language
1515
import xyz.bluspring.unitytranslate.UnityTranslate
1616
import xyz.bluspring.unitytranslate.client.UnityTranslateClient
1717
import xyz.bluspring.unitytranslate.client.gui.OpenBrowserScreen
18-
import xyz.bluspring.unitytranslate.client.gui.RequestDownloadScreen
1918
import xyz.bluspring.unitytranslate.client.transcribers.SpeechTranscriber
2019
import xyz.bluspring.unitytranslate.client.transcribers.TranscriberType
2120
import xyz.bluspring.unitytranslate.config.UnityTranslateConfig
@@ -49,11 +48,7 @@ class BrowserSpeechTranscriber(language: Language) : SpeechTranscriber(language)
4948
Util.getPlatform().openUri("http://127.0.0.1:$serverPort")
5049
} else if (UnityTranslate.config.client.openBrowserWithoutPromptV2 == UnityTranslateConfig.TriState.DEFAULT) {
5150
Minecraft.getInstance().execute {
52-
if (mc.screen is RequestDownloadScreen) {
53-
(mc.screen as RequestDownloadScreen).parent = OpenBrowserScreen("http://127.0.0.1:$serverPort")
54-
} else {
55-
mc.setScreen(OpenBrowserScreen("http://127.0.0.1:$serverPort"))
56-
}
51+
mc.setScreen(OpenBrowserScreen("http://127.0.0.1:$serverPort"))
5752
}
5853
}
5954
}

src/main/kotlin/xyz/bluspring/unitytranslate/translator/TranslatorManager.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import net.minecraft.world.entity.player.Player
1313
import xyz.bluspring.modernnetworking.api.minecraft.VanillaPacketSender
1414
import xyz.bluspring.unitytranslate.Language
1515
import xyz.bluspring.unitytranslate.UnityTranslate
16-
import xyz.bluspring.unitytranslate.client.UnityTranslateClient
1716
import xyz.bluspring.unitytranslate.compat.voicechat.UTVoiceChatCompat
1817
import xyz.bluspring.unitytranslate.library.util.collect
1918
import xyz.bluspring.unitytranslate.library.util.concurrent
@@ -211,11 +210,7 @@ object TranslatorManager {
211210
return
212211

213212
if (UnityTranslate.config.server.shouldRunTranslationServer) {
214-
if (UnityTranslate.instance.proxy.isClient() && !UnityTranslateLibInstance.isLibraryLoaded) {
215-
UnityTranslateClient.openDownloadRequest()
216-
} else {
217-
installLibreTranslate()
218-
}
213+
installLibreTranslate()
219214
}
220215
}
221216

0 commit comments

Comments
 (0)