Skip to content

Commit

Permalink
Updated to v0.25.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd committed Jul 26, 2023
2 parents 94a6452 + 3a4c484 commit 444617a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 9 deletions.
11 changes: 6 additions & 5 deletions src/chatty/gui/components/FollowersDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import chatty.gui.components.menus.StreamsContextMenu;
import chatty.gui.components.menus.UserContextMenu;
import chatty.gui.components.settings.ListTableModel;
import chatty.lang.Language;
import chatty.util.DateTime;
import chatty.util.Debugging;
import chatty.util.StringUtil;
Expand All @@ -23,7 +24,6 @@
import chatty.util.api.TwitchApi;
import chatty.util.colors.ColorCorrectionNew;
import chatty.util.dnd.DockContent;
import chatty.util.dnd.DockContentContainer;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
Expand All @@ -41,7 +41,6 @@
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
Expand Down Expand Up @@ -183,8 +182,10 @@ public FollowersDialog(Type type, MainGui owner, final TwitchApi api,
mainTable = new JScrollPane(table);
mainPanel.add(mainTable, gbc);

JTextArea accessInfoText = new JTextArea("The list of followers is only available for moderators. "
+ "If you are a moderator you may be missing the required access, see 'Main - Account'.");
JTextArea accessInfoText = new JTextArea(
type == Type.FOLLOWERS
? Language.getString("followersDialog.accessInfo")
: Language.getString("subscribersDialog.accessInfo"));
accessInfoText.setLineWrap(true);
accessInfoText.setWrapStyleWord(true);
accessInfoText.setEditable(false);
Expand Down Expand Up @@ -301,7 +302,7 @@ public DockContent getContent() {
}

private void updateMain() {
boolean showTable = currentInfo == null || currentInfo.total == 0 || !currentInfo.followers.isEmpty();
boolean showTable = currentInfo == null || currentInfo.total == 0 || currentInfo.hasFollowers();
mainTable.setVisible(showTable);
accessInfo.setVisible(!showTable);
}
Expand Down
32 changes: 30 additions & 2 deletions src/chatty/gui/components/help/help-releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,39 @@ <h1><a name="top">Release Information</a></h1>
full list of changes.</p>

<h2>
<a name="0.25">Version 0.25</a> <a name="latest">(This one!)</a> (2023-??-??)
<a name="0.25">Version 0.25</a> <a name="latest">(This one!)</a> (2023-07-21)
<a href="#top" class="top">[back to top]</a>
</h2>
<pre>
TBD
### Twitch Features
- Added amount/currency next to Hype Chat messages, added `config:hypechat`
Highlighting prefix
- Switched to new follower API (only allows moderators to see the list of
followers, count is visible for everyone though)
- Added multi-month subs info to subscriber notifications
- Improved badge tooltips based on updated API information

### Custom Commands
- Context Menu/User Dialog custom entries/buttons:
- Added ability to show entries only when they match certain restrictions
(for example based on channel or user status, see the Custom Commands help)
- Entries with empty labels now get removed, so using a required replacement
in a label can also serve to hide it based on certain conditions
- Added more context-specific parameters for use in labels and restrictions
- Added ability to use replacements in User Dialog button labels, like you can
in context menus as well
- Added settings to trigger commands when middle-clicking on user in chat
(equivalent to Ctrl+clicking, in the Settings under "Chat")

### Other
- Select associated message in a few more cases when opening User Dialog
- Improved support for different `.wav` file formats
- Updated Gradle to 8.2.1 (and related build changes)
- Updated Java for the Windows Standalone
- Updated help

### Bugfixes
- Fixed channel status warning appearing in Admin Dialog when it shouldn't
</pre>

<h2>
Expand Down
2 changes: 1 addition & 1 deletion src/chatty/gui/components/help/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1><a name="top">Chatty (Version: 0.25-b2)</a></h1>
<h1><a name="top">Chatty (Version: 0.25)</a></h1>
<table>
<tr>
<td valign="top">
Expand Down
10 changes: 10 additions & 0 deletions src/chatty/lang/Strings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,16 @@ emotesDialog.details.size = Regular Size:
emotesDialog.details.by = Emote by:
emotesDialog.details.info = Right-click on emotes here or in chat to open context-menu with info/options.

!======================!
!== Followers Dialog ==!
!======================!
followersDialog.accessInfo = The list of followers can only be viewed by moderators. If you are a moderator you may be missing the required access, see 'Main - Account'.

!========================!
!== Subscribers Dialog ==!
!========================!
subscribersDialog.accessInfo = The list and amount of subscribers can only be viewed by the broadcaster. If you are the broadcaster you may be missing the required access, see 'Main - Account'.

!=====================!
!== Defaults Dialog ==!
!=====================!
Expand Down
4 changes: 4 additions & 0 deletions src/chatty/util/api/FollowerInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,8 @@ public FollowerInfo replaceFollowers(List<Follower> updatedFollowers) {
return new FollowerInfo(type, stream, updatedFollowers, total, totalPoints);
}

public boolean hasFollowers() {
return followers != null && !followers.isEmpty();
}

}
3 changes: 2 additions & 1 deletion src/chatty/util/api/FollowerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package chatty.util.api;

import chatty.util.DateTime;
import chatty.util.Debugging;
import chatty.util.JSONUtil;
import chatty.util.StringUtil;
import chatty.util.api.Follower.Type;
Expand Down Expand Up @@ -512,7 +513,7 @@ private void requestSingleFollower(String stream, String streamId, String userna
// private static final Instant OLD_FOLLOW_API_OFF = ZonedDateTime.of(2023, 6, 17, 20, 29, 0, 0, ZoneId.of("+02:00")).toInstant(); // For testing only

public static boolean forceNewFollowsApi() {
return Instant.now().isAfter(OLD_FOLLOW_API_OFF);
return Debugging.isEnabled("newfollowerapi") || Instant.now().isAfter(OLD_FOLLOW_API_OFF);
}

}

0 comments on commit 444617a

Please sign in to comment.