From 4698e7b54e3c57a5877d22e7ac9602240f67a3dc Mon Sep 17 00:00:00 2001 From: rainxchzed Date: Sat, 28 Mar 2026 17:09:04 +0500 Subject: [PATCH 1/2] feat: update database schema for search history and repository metadata - Implement `MIGRATION_6_7` to create a new `search_history` table for storing search queries and timestamps. - Update `MIGRATION_5_6` to include additional repository metadata in the `seen_repos` table, including name, owner info, description, language, and URL. - Register `MIGRATION_6_7` in the database initialization logic. --- .../rainxch/core/data/local/db/initDatabase.kt | 2 ++ .../data/local/db/migrations/MIGRATION_5_6.kt | 6 ++++++ .../data/local/db/migrations/MIGRATION_6_7.kt | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt diff --git a/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt index 75a5d28e0..63cc0cb67 100644 --- a/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt +++ b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/initDatabase.kt @@ -8,6 +8,7 @@ import zed.rainxch.core.data.local.db.migrations.MIGRATION_2_3 import zed.rainxch.core.data.local.db.migrations.MIGRATION_3_4 import zed.rainxch.core.data.local.db.migrations.MIGRATION_4_5 import zed.rainxch.core.data.local.db.migrations.MIGRATION_5_6 +import zed.rainxch.core.data.local.db.migrations.MIGRATION_6_7 import zed.rainxch.core.data.local.db.migrations.MIGRATION_7_8 fun initDatabase(context: Context): AppDatabase { @@ -24,6 +25,7 @@ fun initDatabase(context: Context): AppDatabase { MIGRATION_3_4, MIGRATION_4_5, MIGRATION_5_6, + MIGRATION_6_7, MIGRATION_7_8, ).build() } diff --git a/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt index 8c7c6b564..e46a0e65f 100644 --- a/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt +++ b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_5_6.kt @@ -10,6 +10,12 @@ val MIGRATION_5_6 = """ CREATE TABLE IF NOT EXISTS seen_repos ( repoId INTEGER NOT NULL PRIMARY KEY, + repoName TEXT NOT NULL DEFAULT '', + repoOwner TEXT NOT NULL DEFAULT '', + repoOwnerAvatarUrl TEXT NOT NULL DEFAULT '', + repoDescription TEXT, + primaryLanguage TEXT, + repoUrl TEXT NOT NULL DEFAULT '', seenAt INTEGER NOT NULL ) """.trimIndent(), diff --git a/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt new file mode 100644 index 000000000..dcf9be343 --- /dev/null +++ b/core/data/src/androidMain/kotlin/zed/rainxch/core/data/local/db/migrations/MIGRATION_6_7.kt @@ -0,0 +1,18 @@ +package zed.rainxch.core.data.local.db.migrations + +import androidx.room.migration.Migration +import androidx.sqlite.db.SupportSQLiteDatabase + +val MIGRATION_6_7 = + object : Migration(6, 7) { + override fun migrate(db: SupportSQLiteDatabase) { + db.execSQL( + """ + CREATE TABLE IF NOT EXISTS search_history ( + query TEXT NOT NULL PRIMARY KEY, + searchedAt INTEGER NOT NULL + ) + """.trimIndent(), + ) + } + } From 807a45b1fbc063fafc838c0f443a06723a6573ae Mon Sep 17 00:00:00 2001 From: rainxchzed Date: Sat, 28 Mar 2026 17:10:23 +0500 Subject: [PATCH 2/2] ui: adjust horizontal padding in bottom navigation items - Reduce the `targetValue` for horizontal padding in both selected and unselected states within `BottomNavigation.kt`. - Update selected padding from 20.dp to 14.dp and unselected padding from 14.dp to 10.dp. --- .../zed/rainxch/githubstore/app/navigation/BottomNavigation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt index 6b27425f0..36c7fae47 100644 --- a/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt +++ b/composeApp/src/commonMain/kotlin/zed/rainxch/githubstore/app/navigation/BottomNavigation.kt @@ -360,7 +360,7 @@ private fun LiquidGlassTabItem( ) val horizontalPadding by animateDpAsState( - targetValue = if (isSelected) 20.dp else 14.dp, + targetValue = if (isSelected) 14.dp else 10.dp, animationSpec = spring( dampingRatio = Spring.DampingRatioNoBouncy,