diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 37b3e05..a351947 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -780,10 +780,10 @@
         if (FOLDABLE_SINGLE_PAGE.get() && mDeviceProfile.isTwoPanels) {
             mCellPosMapper = new TwoPanelCellPosMapper(mDeviceProfile.inv.numColumns);
         } else {
-            mCellPosMapper = CellPosMapper.DEFAULT;
+            mCellPosMapper = new CellPosMapper(mDeviceProfile.isVerticalBarLayout(),
+                    mDeviceProfile.numShownHotseatIcons);
         }
-        mModelWriter = mModel.getWriter(getDeviceProfile().isVerticalBarLayout(), true,
-                mCellPosMapper, this);
+        mModelWriter = mModel.getWriter(true, mCellPosMapper, this);
         return true;
     }
 
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 551735e..c81db63 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -180,10 +180,10 @@
     }
 
     @NonNull
-    public ModelWriter getWriter(final boolean hasVerticalHotseat, final boolean verifyChanges,
-            CellPosMapper cellPosMapper, @Nullable final Callbacks owner) {
-        return new ModelWriter(mApp.getContext(), this, mBgDataModel,
-                hasVerticalHotseat, verifyChanges, cellPosMapper, owner);
+    public ModelWriter getWriter(final boolean verifyChanges, CellPosMapper cellPosMapper,
+            @Nullable final Callbacks owner) {
+        return new ModelWriter(mApp.getContext(), this, mBgDataModel, verifyChanges, cellPosMapper,
+                owner);
     }
 
     @Override
diff --git a/src/com/android/launcher3/celllayout/CellPosMapper.java b/src/com/android/launcher3/celllayout/CellPosMapper.java
index 1891696..b133a1d 100644
--- a/src/com/android/launcher3/celllayout/CellPosMapper.java
+++ b/src/com/android/launcher3/celllayout/CellPosMapper.java
@@ -17,6 +17,7 @@
 
 import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_DESKTOP;
 
+import com.android.launcher3.LauncherSettings.Favorites;
 import com.android.launcher3.model.data.ItemInfo;
 
 import java.util.Objects;
@@ -26,9 +27,14 @@
  */
 public class CellPosMapper {
 
-    public static final CellPosMapper DEFAULT = new CellPosMapper();
+    public static final CellPosMapper DEFAULT = new CellPosMapper(false, -1);
+    private final boolean mHasVerticalHotseat;
+    private final int mNumOfHotseat;
 
-    private CellPosMapper() { }
+    public CellPosMapper(boolean hasVerticalHotseat, int numOfHotseat) {
+        mHasVerticalHotseat = hasVerticalHotseat;
+        mNumOfHotseat = numOfHotseat;
+    }
 
     /**
      * Maps the position in model to the position in view
@@ -42,17 +48,22 @@
      */
     public CellPos mapPresenterToModel(int presenterX, int presenterY, int presenterScreen,
             int container) {
+        if (container == Favorites.CONTAINER_HOTSEAT) {
+            presenterScreen = mHasVerticalHotseat
+                    ? mNumOfHotseat - presenterY - 1 : presenterX;
+        }
         return new CellPos(presenterX, presenterY, presenterScreen);
     }
 
     /**
      * Cell mapper which maps two panels into a single layout
      */
-    public static class TwoPanelCellPosMapper extends CellPosMapper  {
+    public static class TwoPanelCellPosMapper extends CellPosMapper {
 
         private final int mColumnCount;
 
         public TwoPanelCellPosMapper(int columnCount) {
+            super(false, -1);
             mColumnCount = columnCount;
         }
 
@@ -103,5 +114,13 @@
         public int hashCode() {
             return Objects.hash(cellX, cellY, screenId);
         }
+
+        @Override
+        public String toString() {
+            return "CellPos{"
+                    + "cellX=" + cellX
+                    + ", cellY=" + cellY
+                    + ", screenId=" + screenId + '}';
+        }
     }
 }
diff --git a/src/com/android/launcher3/folder/LauncherDelegate.java b/src/com/android/launcher3/folder/LauncherDelegate.java
index c06a0f3..66c9109 100644
--- a/src/com/android/launcher3/folder/LauncherDelegate.java
+++ b/src/com/android/launcher3/folder/LauncherDelegate.java
@@ -28,7 +28,6 @@
 import com.android.launcher3.DropTarget;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherAppState;
-import com.android.launcher3.celllayout.CellPosMapper;
 import com.android.launcher3.dragndrop.DragOptions;
 import com.android.launcher3.logging.InstanceId;
 import com.android.launcher3.logging.StatsLogManager.StatsLogger;
@@ -177,8 +176,8 @@
         @Override
         ModelWriter getModelWriter() {
             if (mWriter == null) {
-                mWriter = LauncherAppState.getInstance((Context) mContext).getModel()
-                        .getWriter(false, false, CellPosMapper.DEFAULT, null);
+                mWriter = LauncherAppState.getInstance((Context) mContext).getModel().getWriter(
+                        false, mContext.getCellPosMapper(), null);
             }
             return mWriter;
         }
diff --git a/src/com/android/launcher3/model/BaseModelUpdateTask.java b/src/com/android/launcher3/model/BaseModelUpdateTask.java
index 97f540e..529c30a 100644
--- a/src/com/android/launcher3/model/BaseModelUpdateTask.java
+++ b/src/com/android/launcher3/model/BaseModelUpdateTask.java
@@ -101,8 +101,7 @@
     public ModelWriter getModelWriter() {
         // Updates from model task, do not deal with icon position in hotseat. Also no need to
         // verify changes as the ModelTasks always push the changes to callbacks
-        return mModel.getWriter(false /* hasVerticalHotseat */, false /* verifyChanges */,
-                CellPosMapper.DEFAULT, null);
+        return mModel.getWriter(false /* verifyChanges */, CellPosMapper.DEFAULT, null);
     }
 
     public void bindUpdatedWorkspaceItems(@NonNull final List<WorkspaceItemInfo> allUpdates) {
diff --git a/src/com/android/launcher3/model/ModelWriter.java b/src/com/android/launcher3/model/ModelWriter.java
index 2358a9f..55093a3 100644
--- a/src/com/android/launcher3/model/ModelWriter.java
+++ b/src/com/android/launcher3/model/ModelWriter.java
@@ -28,7 +28,6 @@
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
-import com.android.launcher3.LauncherAppState;
 import com.android.launcher3.LauncherModel;
 import com.android.launcher3.LauncherModel.CallbackTask;
 import com.android.launcher3.LauncherSettings.Favorites;
@@ -74,7 +73,6 @@
     @Nullable
     private final Callbacks mOwner;
 
-    private final boolean mHasVerticalHotseat;
     private final boolean mVerifyChanges;
 
     // Keep track of delete operations that occur when an Undo option is present; we may not commit.
@@ -83,12 +81,10 @@
     private final CellPosMapper mCellPosMapper;
 
     public ModelWriter(Context context, LauncherModel model, BgDataModel dataModel,
-            boolean hasVerticalHotseat, boolean verifyChanges, CellPosMapper cellPosMapper,
-            @Nullable Callbacks owner) {
+            boolean verifyChanges, CellPosMapper cellPosMapper, @Nullable Callbacks owner) {
         mContext = context;
         mModel = model;
         mBgDataModel = dataModel;
-        mHasVerticalHotseat = hasVerticalHotseat;
         mVerifyChanges = verifyChanges;
         mOwner = owner;
         mCellPosMapper = cellPosMapper;
@@ -102,14 +98,8 @@
         item.container = container;
         item.cellX = modelPos.cellX;
         item.cellY = modelPos.cellY;
-        // We store hotseat items in canonical form which is this orientation invariant position
-        // in the hotseat
-        if (container == Favorites.CONTAINER_HOTSEAT) {
-            item.screenId = mHasVerticalHotseat
-                    ? LauncherAppState.getIDP(mContext).numDatabaseHotseatIcons - cellY - 1 : cellX;
-        } else {
-            item.screenId = modelPos.screenId;
-        }
+        item.screenId = modelPos.screenId;
+
     }
 
     /**
diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java
index 3921e12..ca7abc2 100644
--- a/src/com/android/launcher3/views/ActivityContext.java
+++ b/src/com/android/launcher3/views/ActivityContext.java
@@ -447,7 +447,8 @@
     }
 
     default CellPosMapper getCellPosMapper() {
-        return CellPosMapper.DEFAULT;
+        DeviceProfile dp = getDeviceProfile();
+        return new CellPosMapper(dp.isVerticalBarLayout(), dp.numShownHotseatIcons);
     }
 
     /** Whether bubbles are enabled. */
diff --git a/tests/src/com/android/launcher3/celllayout/CellPosMapperTest.java b/tests/src/com/android/launcher3/celllayout/CellPosMapperTest.java
index 29efb18..b8bf362 100644
--- a/tests/src/com/android/launcher3/celllayout/CellPosMapperTest.java
+++ b/tests/src/com/android/launcher3/celllayout/CellPosMapperTest.java
@@ -39,44 +39,46 @@
 
     @Test
     public void testMapModelToPresenter_default() {
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        CellPosMapper mapper = CellPosMapper.DEFAULT;
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(0, 0, 0, CONTAINER_DESKTOP))).isEqualTo(new CellPos(0, 0, 0));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(0, 0, 1, CONTAINER_DESKTOP))).isEqualTo(new CellPos(0, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(5, 0, 1, CONTAINER_DESKTOP))).isEqualTo(new CellPos(5, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(5, 0, 0, CONTAINER_DESKTOP))).isEqualTo(new CellPos(5, 0, 0));
 
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(0, 0, 0, CONTAINER_HOTSEAT))).isEqualTo(new CellPos(0, 0, 0));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(0, 0, 1, CONTAINER_HOTSEAT))).isEqualTo(new CellPos(0, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(5, 0, 1, CONTAINER_HOTSEAT))).isEqualTo(new CellPos(5, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapModelToPresenter(
+        assertThat(mapper.mapModelToPresenter(
                 createInfo(5, 0, 0, CONTAINER_HOTSEAT))).isEqualTo(new CellPos(5, 0, 0));
     }
 
     @Test
     public void testMapPresenterToModel_default() {
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
+        CellPosMapper mapper = CellPosMapper.DEFAULT;
+        assertThat(mapper.mapPresenterToModel(
                 0, 0, 0, CONTAINER_DESKTOP)).isEqualTo(new CellPos(0, 0, 0));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
+        assertThat(mapper.mapPresenterToModel(
                 0, 0, 1, CONTAINER_DESKTOP)).isEqualTo(new CellPos(0, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
+        assertThat(mapper.mapPresenterToModel(
                 5, 0, 1, CONTAINER_DESKTOP)).isEqualTo(new CellPos(5, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
+        assertThat(mapper.mapPresenterToModel(
                 5, 0, 0, CONTAINER_DESKTOP)).isEqualTo(new CellPos(5, 0, 0));
 
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
+        assertThat(mapper.mapPresenterToModel(
                 0, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 0));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
-                0, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
-                5, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 1));
-        assertThat(CellPosMapper.DEFAULT.mapPresenterToModel(
-                5, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 0));
+        assertThat(mapper.mapPresenterToModel(
+                0, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 0));
+        assertThat(mapper.mapPresenterToModel(
+                5, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 5));
+        assertThat(mapper.mapPresenterToModel(
+                5, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 5));
     }
 
     @Test
@@ -116,11 +118,33 @@
         assertThat(mapper.mapPresenterToModel(
                 0, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 0));
         assertThat(mapper.mapPresenterToModel(
-                0, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 1));
+                0, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 0));
         assertThat(mapper.mapPresenterToModel(
-                5, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 1));
+                5, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 5));
         assertThat(mapper.mapPresenterToModel(
-                5, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 0));
+                5, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(5, 0, 5));
+    }
+
+    @Test
+    public void testMapPresenterToModel_VerticalHotseat() {
+        CellPosMapper mapper = new CellPosMapper(true, 6);
+        assertThat(mapper.mapPresenterToModel(
+                0, 0, 0, CONTAINER_DESKTOP)).isEqualTo(new CellPos(0, 0, 0));
+        assertThat(mapper.mapPresenterToModel(
+                0, 0, 1, CONTAINER_DESKTOP)).isEqualTo(new CellPos(0, 0, 1));
+        assertThat(mapper.mapPresenterToModel(
+                5, 0, 1, CONTAINER_DESKTOP)).isEqualTo(new CellPos(5, 0, 1));
+        assertThat(mapper.mapPresenterToModel(
+                5, 0, 0, CONTAINER_DESKTOP)).isEqualTo(new CellPos(5, 0, 0));
+
+        assertThat(mapper.mapPresenterToModel(
+                0, 0, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 5));
+        assertThat(mapper.mapPresenterToModel(
+                0, 0, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 0, 5));
+        assertThat(mapper.mapPresenterToModel(
+                0, 5, 1, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 5, 0));
+        assertThat(mapper.mapPresenterToModel(
+                0, 5, 0, CONTAINER_HOTSEAT)).isEqualTo(new CellPos(0, 5, 0));
     }
 
     private ItemInfo createInfo(int cellX, int cellY, int screen, int container) {
