mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-22 12:23:10 +01:00
eeeeh
This commit is contained in:
parent
fd8c724f47
commit
4df77245b8
1 changed files with 4 additions and 5 deletions
|
@ -544,11 +544,10 @@ public class GuiSkins extends GuiScreen {
|
||||||
uploadingSkin = true;
|
uploadingSkin = true;
|
||||||
skinUploadMessage = I18n.format(uploadMsg);
|
skinUploadMessage = I18n.format(uploadMsg);
|
||||||
|
|
||||||
// TODO: This looks too much like the "fetch(method, url, headers).then(...then(..).then(...)).then(...).catch(...).then(...).then(...)...etc" hell.
|
|
||||||
HDSkinManager.INSTANCE.getGatewayServer()
|
HDSkinManager.INSTANCE.getGatewayServer()
|
||||||
.uploadSkin(mc.getSession(), path, textureType, getMetadata())
|
.uploadSkin(mc.getSession(), path, textureType, getMetadata())
|
||||||
.thenAccept(this::onUploadComplete)
|
.thenAccept(this::onUploadComplete)
|
||||||
.exceptionally(this::onUploadFailed);
|
.exceptionally(this::onUploadFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onUploadComplete(SkinUploadResponse response) {
|
private void onUploadComplete(SkinUploadResponse response) {
|
||||||
|
@ -566,7 +565,7 @@ public class GuiSkins extends GuiScreen {
|
||||||
setUploadError(t.toString());
|
setUploadError(t.toString());
|
||||||
uploadingSkin = false;
|
uploadingSkin = false;
|
||||||
|
|
||||||
return null;
|
return null; // TODO: Why must this return something? >.>
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<String, String> getMetadata() {
|
private Map<String, String> getMetadata() {
|
||||||
|
|
Loading…
Reference in a new issue