Skip to content

Commit

Permalink
remove redundant argument
Browse files Browse the repository at this point in the history
  • Loading branch information
john-peterson committed Sep 26, 2024
1 parent 36d811e commit 2ff5956
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2ff5956

Please sign in to comment.