RPMTW Platform

RPMTW Platform

259k Downloads

相關 Http 連線的 Code 可以改成 Async 運作

lulu2002 opened this issue · 4 comments

commented

遊戲內提交物品翻譯、設定 Crowdin token 的功能非常方便!只可惜因為 Code 是同步處理的關係,導致每次要提交翻譯搜尋物品時,整個遊戲畫面都會卡住。

若能使用 Async Code Chain 的方式來寫相關聯網偵測的話,便能解決卡頓問題!打開翻譯界面之前,玩家依然可以自由玩遊戲!

(Async Code Chain 可參考 Java 的 CompletableFuture 函式庫,使用教學:https://www.baeldung.com/java-completablefuture)

commented

OK 非常感謝你提交此建議,我正在嘗試讓它異步執行。

commented

讚~這個功能並不難做,CompletableFuture 可以幫助你用最舒服的方式寫出這個功能~

commented

CompletableFuture 好像是用在Java8以下?

commented

已經修改完畢囉,歡迎測試(可以下載Github自動建置的版本)