Skip to content

Commit c116f28

Browse files
committed
fixed auth layer always appearing even when already authenticated (which slows down the accessing of betterThumbnailLayer and potentially gets you ratelimited)
1 parent 05f1f01 commit c116f28

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/main.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,7 @@ class $modify(MyCreatorLayer, CreatorLayer) {
3434

3535
void onBTNButton(CCObject*) {
3636
if (Mod::get()->hasSavedValue("token") & !Mod::get()->getSettingValue<bool>("dev-force-reauth")) {
37-
auto authLayer = AuthLayer::create();
38-
auto scene = CCDirector::sharedDirector()->getRunningScene();
39-
if (scene && authLayer) {
40-
scene->addChild(authLayer, 9999);
41-
} else {
42-
FLAlertLayer::create(
43-
"Error",
44-
"Could not open authentication layer.",
45-
"OK")
46-
->show();
47-
}
37+
CCDirector::get()->pushScene(CCTransitionFade::create(.5f, BetterThumbnailLayer::scene()));
4838
} else {
4939
geode::createQuickPopup(
5040
"Notice",

0 commit comments

Comments
 (0)