Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import org.jackhuang.hmcl.upgrade.UpdateChannel;
import org.jackhuang.hmcl.upgrade.UpdateChecker;
import org.jackhuang.hmcl.upgrade.UpdateHandler;
import org.jackhuang.hmcl.util.AprilFools;
import org.jackhuang.hmcl.util.Lang;
import org.jackhuang.hmcl.util.StringUtils;
import org.jackhuang.hmcl.util.i18n.I18n;
Expand Down Expand Up @@ -200,7 +199,7 @@ else if (locale.isSameLanguage(currentLocale))
{
ComponentList miscPaneList = new ComponentList();

if (AprilFools.isShowAprilFoolsSettings()) {
{
LineToggleButton disableAprilFools = new LineToggleButton();
disableAprilFools.setTitle(i18n("settings.launcher.disable_april_fools"));
disableAprilFools.setSubtitle(i18n("settings.take_effect_after_restart"));
Expand Down
9 changes: 0 additions & 9 deletions HMCL/src/main/java/org/jackhuang/hmcl/util/AprilFools.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
public final class AprilFools {

private static final boolean ENABLED;
private static final boolean SHOW_APRIL_FOOLS_SETTINGS;

static {
var date = LocalDate.now();
Expand All @@ -58,14 +57,6 @@ else if ("false".equalsIgnoreCase(value) || !supportedRegion)
aprilFoolsMode = date.getMonth() == Month.APRIL && date.getDayOfMonth() == 1;

ENABLED = aprilFoolsMode && !config().isDisableAprilFools();
SHOW_APRIL_FOOLS_SETTINGS = aprilFoolsMode || supportedRegion && date.getMonth() == Month.MARCH && date.getDayOfMonth() > 30;
}

/// Whether April Fools settings should be shown.
///
/// This method returns true if April Fools settings should be shown.
public static boolean isShowAprilFoolsSettings() {
return SHOW_APRIL_FOOLS_SETTINGS;
}

/// Whether April Fools is enabled.
Expand Down