Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
@@ -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(),
)
}
}