Skip to content

Commit 089d8d6

Browse files
committed
Minor changes to new social/gift events!
1 parent 4be74c4 commit 089d8d6

File tree

5 files changed

+50
-60
lines changed

5 files changed

+50
-60
lines changed

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/gift/TikTokGiftComboEvent.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,10 @@ public TikTokGiftComboEvent(Gift gift, User host, User user, int combo, GiftComb
4545
}
4646

4747
public static TikTokGiftComboEvent of(Gift gift, int combo, GiftComboStateType comboState) {
48-
return new TikTokGiftComboEvent(
49-
gift,
50-
new User(0L, "Test", new Picture("")),
51-
WebcastGiftMessage.newBuilder().setComboCount(combo).build(),
52-
comboState);
48+
return new TikTokGiftComboEvent(gift, new User(0L, "Test", new Picture("")), WebcastGiftMessage.newBuilder().setComboCount(combo).build(), comboState);
5349
}
5450

5551
public static TikTokGiftComboEvent of(Gift gift, User host, User user, int combo, GiftComboStateType comboState) {
56-
return new TikTokGiftComboEvent(gift,
57-
host,
58-
user,
59-
combo,
60-
comboState);
52+
return new TikTokGiftComboEvent(gift, host, user, combo, comboState);
6153
}
6254
}

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/social/TikTokFollowEvent.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ public TikTokFollowEvent(WebcastSocialMessage msg) {
4444

4545
public static TikTokFollowEvent of(String userName) {
4646
return new TikTokFollowEvent(WebcastSocialMessage.newBuilder()
47-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
48-
.setUsername(userName)
49-
.setNickname(userName)
50-
.build())
51-
.build());
47+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
48+
.setUsername(userName)
49+
.setNickname(userName)
50+
.build())
51+
.build());
5252
}
5353

5454
public static TikTokFollowEvent of(User user) {
5555
return new TikTokFollowEvent(WebcastSocialMessage.newBuilder()
56-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
57-
.setUsername(user.getName())
58-
.setNickname(user.getProfileName() != null ? user.getProfileName() : user.getName())
59-
.setId(user.getId())
60-
.build())
61-
.build());
56+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
57+
.setUsername(user.getName())
58+
.setNickname(user.getProfileName() != null ? user.getProfileName() : user.getName())
59+
.setId(user.getId())
60+
.build())
61+
.build());
6262
}
6363
}

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/social/TikTokJoinEvent.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,22 @@ public TikTokJoinEvent(WebcastMemberMessage msg) {
4848
totalUsers = msg.getMemberCount();
4949
}
5050

51-
public static TikTokJoinEvent of(String userName)
52-
{
51+
public static TikTokJoinEvent of(String userName) {
5352
return new TikTokJoinEvent(WebcastMemberMessage.newBuilder()
54-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
55-
.setUsername(userName)
56-
.setNickname(userName)
57-
.build())
58-
.build());
53+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
54+
.setUsername(userName)
55+
.setNickname(userName)
56+
.build())
57+
.build());
5958
}
6059

6160
public static TikTokJoinEvent of(User user) {
6261
return new TikTokJoinEvent(WebcastMemberMessage.newBuilder()
63-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
64-
.setUsername(user.getName())
65-
.setNickname(user.getProfileName())
66-
.setId(user.getId())
67-
.build())
68-
.build());
62+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
63+
.setUsername(user.getName())
64+
.setNickname(user.getProfileName())
65+
.setId(user.getId())
66+
.build())
67+
.build());
6968
}
7069
}

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/social/TikTokLikeEvent.java

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,25 @@ public TikTokLikeEvent(WebcastLikeMessage msg) {
5656
totalLikes = msg.getTotal();
5757
}
5858

59-
public static TikTokLikeEvent of(String userName, int likes)
60-
{
59+
public static TikTokLikeEvent of(String userName, int likes) {
6160
return new TikTokLikeEvent(WebcastLikeMessage.newBuilder()
62-
.setCount(likes)
63-
.setTotal(likes)
64-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
65-
.setUsername(userName)
66-
.setNickname(userName)
67-
.build())
68-
.build());
61+
.setCount(likes)
62+
.setTotal(likes)
63+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
64+
.setUsername(userName)
65+
.setNickname(userName)
66+
.build())
67+
.build());
6968
}
7069

7170
public static TikTokLikeEvent of(User user, int likes) {
7271
return new TikTokLikeEvent(WebcastLikeMessage.newBuilder()
73-
.setCount(likes)
74-
.setTotal(likes)
75-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
76-
.setUsername(user.getName())
77-
.setNickname(user.getProfileName())
78-
.build())
79-
.build());
72+
.setCount(likes)
73+
.setTotal(likes)
74+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
75+
.setUsername(user.getName())
76+
.setNickname(user.getProfileName())
77+
.build())
78+
.build());
8079
}
8180
}

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/social/TikTokShareEvent.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ public TikTokShareEvent(WebcastSocialMessage msg) {
4949

5050
public static TikTokShareEvent of(String userName, int shaders) {
5151
return new TikTokShareEvent(WebcastSocialMessage.newBuilder()
52-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
53-
.setUsername(userName)
54-
.setNickname(userName)
55-
.build())
56-
.build(), shaders);
52+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
53+
.setUsername(userName)
54+
.setNickname(userName)
55+
.build())
56+
.build(), shaders);
5757
}
5858

5959
public static TikTokShareEvent of(User user, int shaders) {
6060
return new TikTokShareEvent(WebcastSocialMessage.newBuilder()
61-
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
62-
.setUsername(user.getName())
63-
.setNickname(user.getProfileName())
64-
.build())
65-
.build(), shaders);
61+
.setUser(io.github.jwdeveloper.tiktok.messages.data.User.newBuilder()
62+
.setUsername(user.getName())
63+
.setNickname(user.getProfileName())
64+
.build())
65+
.build(), shaders);
6666
}
6767
}

0 commit comments

Comments
 (0)