Skip to content

Commit 056ca13

Browse files
committed
feat(main): Added option for custom badges
From #51
1 parent 77db4ee commit 056ca13

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

mod.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@
257257
"description": "This category is for any other feature for <cy>GDUtils</c>.\nYou can choose whether to <cy>enable</c> or <cy>disable</c> some options if you do not want them.",
258258
"type": "title"
259259
},
260+
"customBadges": {
261+
"name": "Custom Badges",
262+
"description": "Whether or not to show custom badges in <cg>Profile</c> and <cg>Comments</c>.",
263+
"type": "bool",
264+
"default": true
265+
},
260266
"friendSearch": {
261267
"name": "Search Friends",
262268
"description": "Whether or not to show the search button in the <cg>Friends List Menu</c>.",

src/Styles/NewGJCommentList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class $modify(CommentCell) {
304304
m_fields->m_listener.setFilter(req.get("https://clarifygdps.com/gdutils/gdutils_roles.php"));
305305
}
306306

307-
if (layer) {
307+
if (layer && Mod::get()->template getSettingValue<bool>("customBadges")) {
308308
requestGDUtilsBadges(layer, comment->m_commentID);
309309
}
310310
}

src/Styles/NewProfilePage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,6 @@ class $modify(ProfilePage) {
510510
if (username_menu != nullptr) username_menu->updateLayout();
511511
}
512512

513-
requestGDUtilsBadges(a2->m_accountID, layer);
513+
if (Mod::get()->template getSettingValue<bool>("customBadges")) requestGDUtilsBadges(a2->m_accountID, layer);
514514
}
515515
};

0 commit comments

Comments
 (0)