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

Commit 9e2a679e authored by Saalim Quadri's avatar Saalim Quadri
Browse files

check

parent 0b7f2638
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -105,8 +105,14 @@ public class TaskbarScrollController {

    /**
     * Determines if icon scrolling should be enabled based on current conditions.
     * This exactly replicates your original working logic.
     */
    private boolean shouldEnableIconScrolling() {
        // Don't enable scrolling if TaskbarView is not yet fully initialized
        if (!mTaskbarView.isInitialized()) {
            return false;
        }
        
        Resources resources = mTaskbarView.getResources();
        Configuration config = resources.getConfiguration();
        boolean isPortrait = config.orientation == Configuration.ORIENTATION_PORTRAIT;
@@ -122,9 +128,7 @@ public class TaskbarScrollController {
        
        boolean shouldScroll = totalIconCount > maxFittableIcons;
        android.util.Log.d("TaskbarScrollView", "shouldEnableIconScrolling: totalIcons=" + totalIconCount + 
                ", maxFittable=" + maxFittableIcons + ", shouldScroll=" + shouldScroll + 
                ", isPortrait=" + isPortrait + ", isThreeButtonNav=" + isThreeButtonNav + 
                ", isTablet=" + isTablet);
                ", maxFittable=" + maxFittableIcons + ", shouldScroll=" + shouldScroll);
        
        return shouldScroll;
    }
+7 −0
Original line number Diff line number Diff line
@@ -232,6 +232,13 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
        mScrollController.updateScrollingBehavior();
    }

    /**
     * Returns whether TaskbarView is fully initialized (callbacks are set).
     */
    public boolean isInitialized() {
        return mControllerCallbacks != null;
    }

    /**
     * Calculates the maximum number of icons that can fit in the taskbar without scrolling.
     * This replicates the layout calculation logic from updateItemsLayout.