Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 999e81d0 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge remote-tracking branch 'origin/lineage-23.2' into a16.2

parents 813cbbe4 8eeb7a07
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.view.WindowManager;

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
@@ -221,7 +222,14 @@ public class TopLevelSettings extends DashboardFragment implements SplitLayoutLi
    public void onSplitLayoutChanged(boolean isRegularLayout) {
        iteratePreferences(preference -> {
            if (preference instanceof HomepagePreferenceLayout) {
                ((HomepagePreferenceLayout) preference).getHelper().setIconVisible(isRegularLayout);
                Context context = getContext();
                boolean isLargeScreen = SettingsThemeHelper.isTablet(context) ||
                        (context != null && context.getApplicationContext()
                                .getResources().getConfiguration().smallestScreenWidthDp >=
                                WindowManager.LARGE_SCREEN_SMALLEST_SCREEN_WIDTH_DP);
                boolean visible = isRegularLayout || isLargeScreen;

                ((HomepagePreferenceLayout) preference).getHelper().setIconVisible(visible);
            }
        });
    }