Skip to content

Commit 8c05624

Browse files
committed
d
1 parent adf141b commit 8c05624

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
**Download, upload, or find custom objects made by other creators!**
33

44
This mod was made with most of the hard work done by me! <cp>Firee</c>!
5-
Thank you to <cj>Midair</c> for the mod idea, <cy>Alphalaneous</c> for the extra mod ui design / feedback, and <cy>Zidnes</c> for creating the ui concept!
5+
Thank you to <cj>Midair</c> for the mod idea, <cy>Alphalaneous</c> for the extra mod ui design / feedback, and <cy>[Zidnes](https://x.com/SZidnes)</c> for creating the ui concept!
66

77
<cy>Additionally, thank you to these people for helping test the mod!</c>
88
- TechStudent11

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v1.4.4
2+
- Fixed issue with opening and closing ProfilePage randomly causing crashes
3+
- Don't allow opening Object Workshop in ProfilePage while in a level (not sure why you would do that...)
4+
- Added links to credits for Zidnes
15
# v1.4.1
26
- Ported to Geode v4.0.0-beta.1 (2.207!)
37
- Added DashAuth authentication option

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"id": "firee.object-workshop",
1010
"name": "Object Workshop",
11-
"version": "v1.4.3",
11+
"version": "v1.4.4",
1212
"developer": "Firee",
1313
"description": "Download, upload, or find custom objects made by other creators!",
1414
"resources": {

src/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,19 +269,19 @@ class $modify(ObjectBypass, EditorUI) {
269269

270270
#include <Geode/modify/ProfilePage.hpp>
271271

272-
EventListener<web::WebTask> m_profileListener;
273-
274272
class $modify(ProfilePage) {
275273
struct Fields {
276274
CCMenuItemSpriteExtra* customObjsBtn;
275+
EventListener<web::WebTask> m_profileListener;
277276
};
278277
void onClose(CCObject* sender) {
279-
m_profileListener.getFilter().cancel();
278+
m_fields->m_profileListener.getFilter().cancel();
280279
ProfilePage::onClose(sender);
281280
}
282281
void loadPageFromUserInfo(GJUserScore* user) {
283282
ProfilePage::loadPageFromUserInfo(user);
284-
m_profileListener.bind([this] (web::WebTask::Event* e) {
283+
if (GJBaseGameLayer::get()) return;
284+
m_fields->m_profileListener.bind([this] (web::WebTask::Event* e) {
285285
if (web::WebResponse* value = e->getValue()) {
286286
log::info("Request was finished!");
287287
if (value->json().err() && !value->ok() && value->code() >= 500) {
@@ -394,9 +394,9 @@ class $modify(ProfilePage) {
394394
auto workshop = typeinfo_cast<ObjectWorkshop*>(scene->getChildByID("objectworkshop"_spr));
395395
if (workshop != nullptr) return; // so you cant loop lol
396396
web::WebRequest req = web::WebRequest();
397-
m_profileListener.getFilter().cancel();
397+
m_fields->m_profileListener.getFilter().cancel();
398398
req.userAgent(USER_AGENT);
399-
m_profileListener.setFilter(req.get(fmt::format("{}/user/{}", HOST_URL, m_accountID)));
399+
m_fields->m_profileListener.setFilter(req.get(fmt::format("{}/user/{}", HOST_URL, m_accountID)));
400400
}
401401
}
402402
};

0 commit comments

Comments
 (0)