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

Verified Commit ee2f2f75 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Saalim Quadri
Browse files

feat: Fix item id after migration

parent 9717632d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -233,6 +233,8 @@ object BlissDbUtils {
            }
        }

        // Update item id after migrating
        dbHelper.updateItemId()
        dbHelper.close()

        // Rename the database to old
+4 −0
Original line number Diff line number Diff line
@@ -103,6 +103,10 @@ public class DatabaseHelper extends NoLocaleSQLiteHelper implements
        mMaxItemId.compareAndSet(-1, initializeMaxItemId(getWritableDatabase()));
    }

    public void updateItemId() {
        mMaxItemId.set(initializeMaxItemId(getWritableDatabase()));
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        if (LOGD) Log.d(TAG, "creating new launcher database");