From 2ff5956901c9732f8c14cbde826ed5d5bdd33e0f Mon Sep 17 00:00:00 2001 From: John Sebastian Peterson Date: Mon, 23 Sep 2024 13:14:50 +0300 Subject: [PATCH] remove redundant argument --- .../termux/app/terminal/TermuxSessionsListViewController.java | 3 +-- .../src/main/java/com/termux/shared/theme/ThemeUtils.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java b/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java index bf914b977b..615edeace0 100644 --- a/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java +++ b/app/src/main/java/com/termux/app/terminal/TermuxSessionsListViewController.java @@ -21,7 +21,6 @@ import com.termux.R; import com.termux.app.TermuxActivity; import com.termux.shared.termux.shell.command.runner.terminal.TermuxSession; -import com.termux.shared.theme.NightMode; import com.termux.shared.theme.ThemeUtils; import com.termux.terminal.TerminalSession; @@ -57,7 +56,7 @@ public View getView(int position, View convertView, @NonNull ViewGroup parent) { return sessionRowView; } - boolean shouldEnableDarkTheme = ThemeUtils.shouldEnableDarkTheme(mActivity, NightMode.getAppNightMode().getName()); + boolean shouldEnableDarkTheme = ThemeUtils.shouldEnableDarkTheme(mActivity); if (shouldEnableDarkTheme) { sessionTitleView.setBackground( diff --git a/termux-shared/src/main/java/com/termux/shared/theme/ThemeUtils.java b/termux-shared/src/main/java/com/termux/shared/theme/ThemeUtils.java index 2b652026fb..352f42411e 100644 --- a/termux-shared/src/main/java/com/termux/shared/theme/ThemeUtils.java +++ b/termux-shared/src/main/java/com/termux/shared/theme/ThemeUtils.java @@ -26,7 +26,8 @@ public static boolean isNightModeEnabled(Context context) { /** Will return true if mode is set to {@link NightMode#TRUE}, otherwise will return true if * mode is set to {@link NightMode#SYSTEM} and night mode is enabled by system. */ - public static boolean shouldEnableDarkTheme(Context context, String name) { + public static boolean shouldEnableDarkTheme(Context context) { + String name = NightMode.getAppNightMode().getName(); if (NightMode.TRUE.getName().equals(name)) return true; else if (NightMode.FALSE.getName().equals(name))