Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 89067dc

Browse files
committed
add option to allow friends to access uploaded images in gallery
1 parent 6c84c32 commit 89067dc

File tree

7 files changed

+23
-25
lines changed

7 files changed

+23
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- (1.8.9, 1.16) Enable texture nine-slicing for all ButtonWidgets
99
- Update bedwars module
1010
- add secondary keybinding for freelook
11+
- add options to display durability numbers for ArmorHuds
1112

1213
### 3.1.0
1314

common/src/main/java/io/github/axolotlclient/api/API.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,11 @@ private void authenticate() {
168168
logDetailed("Created self user!");
169169
}),
170170
AccountSettingsRequest.get().thenAccept(r -> {
171-
apiOptions.retainUsernames.set(r.isRetainUsernames());
172-
apiOptions.showActivity.set(r.isShowActivity());
173-
apiOptions.showLastOnline.set(r.isShowLastOnline());
174-
apiOptions.showRegistered.set(r.isShowRegistered());
171+
apiOptions.retainUsernames.set(r.retainUsernames());
172+
apiOptions.showActivity.set(r.showActivity());
173+
apiOptions.showLastOnline.set(r.showLastOnline());
174+
apiOptions.showRegistered.set(r.showRegistered());
175+
apiOptions.allowFriendsImageAccess.set(r.allowFriendsImageAccess());
175176
})).thenRun(() -> logDetailed("completed data requests")).join();
176177
createSession();
177178
startStatusUpdateThread();

common/src/main/java/io/github/axolotlclient/api/Options.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public abstract class Options implements Module {
7979
public final BooleanOption retainUsernames = new BooleanOption("api.account.settings.retain_usernames", true, settingUpdated::accept);
8080
public final BooleanOption showLastOnline = new BooleanOption("api.account.settings.show_last_online", true, settingUpdated::accept);
8181
public final BooleanOption showActivity = new BooleanOption("api.account.settings.show_activity", true, settingUpdated::accept);
82+
public final BooleanOption allowFriendsImageAccess = new BooleanOption("api.account.settings.allow_friends_image_access", true, settingUpdated::accept);
8283

8384
protected final OptionCategory category = OptionCategory.create("api.category");
8485
protected final OptionCategory pluralkit = OptionCategory.create("api.pluralkit");
@@ -90,11 +91,12 @@ public void init() {
9091
showRegistered.get(),
9192
retainUsernames.get(),
9293
showLastOnline.get(),
93-
showActivity.get()
94+
showActivity.get(),
95+
allowFriendsImageAccess.get()
9496
));
9597
pkToken.setMaxLength(65);
9698
pluralkit.add(pkToken, autoproxy, autoproxyMode, autoproxyMember);
97-
account.add(showRegistered, retainUsernames, showLastOnline, showActivity);
99+
account.add(showRegistered, retainUsernames, showLastOnline, showActivity, allowFriendsImageAccess);
98100
category.add(pluralkit, account);
99101
category.add(enabled, friendRequestsEnabled, statusUpdateNotifs, channelInvitesEnabled, detailedLogging, updateNotifications, displayNotes, addShortcutButtons);
100102
}

common/src/main/java/io/github/axolotlclient/api/requests/AccountSettingsRequest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,17 @@ public static CompletableFuture<AccountSettings> get() {
3737
response.getBody("show_registered"),
3838
response.getBody("retain_usernames"),
3939
response.getBody("show_last_online"),
40-
response.getBody("show_activity")));
40+
response.getBody("show_activity"),
41+
response.getBody("allow_friends_image_access")));
4142
}
4243

4344
public static CompletableFuture<Void> update(AccountSettings settings) {
4445
return API.getInstance().patch(Request.Route.ACCOUNT_SETTINGS.builder()
45-
.field("show_registered", settings.isShowRegistered())
46-
.field("retain_usernames", settings.isRetainUsernames())
47-
.field("show_last_online", settings.isShowLastOnline())
48-
.field("show_activity", settings.isShowActivity())
46+
.field("show_registered", settings.showRegistered())
47+
.field("retain_usernames", settings.retainUsernames())
48+
.field("show_last_online", settings.showLastOnline())
49+
.field("show_activity", settings.showActivity())
50+
.field("allow_friends_image_access", settings.allowFriendsImageAccess())
4951
.build())
5052
.thenAccept(response -> {
5153

common/src/main/java/io/github/axolotlclient/api/types/AccountSettings.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@
2222

2323
package io.github.axolotlclient.api.types;
2424

25-
import lombok.AllArgsConstructor;
26-
import lombok.Getter;
27-
import lombok.Setter;
28-
29-
@AllArgsConstructor
30-
@Setter
31-
@Getter
32-
public class AccountSettings {
33-
private boolean showRegistered;
34-
private boolean retainUsernames;
35-
private boolean showLastOnline;
36-
private boolean showActivity;
25+
public record AccountSettings(boolean showRegistered, boolean retainUsernames, boolean showLastOnline,
26+
boolean showActivity, boolean allowFriendsImageAccess) {
3727
}

common/src/main/resources/assets/axolotlclient/lang/en_us.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,5 +632,7 @@
632632
"show_max_durability_num": "Show Maximum Durability Number",
633633
"key.freelook.alt": "Freelook (Alternative)",
634634
"perspective.alt": "Perspective (Alternative Key)",
635-
"toggle.alt": "Toggle (Alternative Key)"
635+
"toggle.alt": "Toggle (Alternative Key)",
636+
"api.account.settings.allow_friends_image_access": "Allow Friends Image Access",
637+
"api.account.settings.allow_friends_image_access.tooltip": "Allow friends to access images you upload directly in their gallery screen.<br>Disabling this does NOT stop images from being available via their url or id,<br>it only prevents friends from seeing your images in the \"Shared by friends\" gallery tab."
636638
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.parallel=true
66
axolotlclient.modules.all=true
77

88
# Mod Properties
9-
version=3.1.1-beta.1
9+
version=3.1.1-beta.2
1010

1111
maven_group=io.github.axolotlclient
1212

0 commit comments

Comments
 (0)