File tree Expand file tree Collapse file tree 4 files changed +23
-13
lines changed
common/src/main/java/jp/co/soramitsu/common/compose/component
core-db/src/main/java/jp/co/soramitsu/coredb Expand file tree Collapse file tree 4 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -63,20 +63,14 @@ fun FullScreenLoading(
6363 .border(4 .dp, white08, shape = CircleShape )
6464 .background(transparent, shape = CircleShape )
6565 )
66- Box (
66+ CircularProgressIndicator (
6767 modifier = Modifier
6868 .fillMaxSize()
69- .blur(1 .dp)
7069 .padding(8 .dp)
71- ) {
72- CircularProgressIndicator (
73- modifier = Modifier
74- .fillMaxSize()
75- .align(Alignment .Center ),
76- color = colorAccentDark,
77- strokeWidth = 4 .dp
78- )
79- }
70+ .align(Alignment .Center ),
71+ color = colorAccentDark,
72+ strokeWidth = 4 .dp
73+ )
8074 Image (
8175 res = R .drawable.ic_fearless_logo,
8276 tint = colorAccentDark,
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ import jp.co.soramitsu.coredb.migrations.Migration_50_51
5757import jp.co.soramitsu.coredb.migrations.Migration_51_52
5858import jp.co.soramitsu.coredb.migrations.Migration_52_53
5959import jp.co.soramitsu.coredb.migrations.Migration_53_54
60+ import jp.co.soramitsu.coredb.migrations.Migration_54_55
6061import jp.co.soramitsu.coredb.migrations.RemoveAccountForeignKeyFromAsset_17_18
6162import jp.co.soramitsu.coredb.migrations.RemoveLegacyData_35_36
6263import jp.co.soramitsu.coredb.migrations.RemoveStakingRewardsTable_22_23
@@ -81,7 +82,7 @@ import jp.co.soramitsu.coredb.model.chain.ChainTypesLocal
8182import jp.co.soramitsu.coredb.model.chain.MetaAccountLocal
8283
8384@Database(
84- version = 54 ,
85+ version = 55 ,
8586 entities = [
8687 AccountLocal ::class ,
8788 AddressBookContact ::class ,
@@ -155,6 +156,7 @@ abstract class AppDatabase : RoomDatabase() {
155156 .addMigrations(Migration_51_52 )
156157 .addMigrations(Migration_52_53 )
157158 .addMigrations(Migration_53_54 )
159+ .addMigrations(Migration_54_55 )
158160 .build()
159161 }
160162 return instance!!
Original file line number Diff line number Diff line change @@ -3,6 +3,16 @@ package jp.co.soramitsu.coredb.migrations
33import androidx.room.migration.Migration
44import androidx.sqlite.db.SupportSQLiteDatabase
55
6+ val Migration_54_55 = object : Migration (54 , 55 ) {
7+ override fun migrate (database : SupportSQLiteDatabase ) {
8+ database.execSQL(
9+ """
10+ CREATE UNIQUE INDEX IF NOT EXISTS `index_address_book_address_chainId` ON `address_book` (`address`, `chainId`)
11+ """ .trimIndent()
12+ )
13+ }
14+ }
15+
616val Migration_53_54 = object : Migration (53 , 54 ) {
717 override fun migrate (database : SupportSQLiteDatabase ) {
818 database.execSQL(" DROP TABLE IF EXISTS _chains" )
Original file line number Diff line number Diff line change 11package jp.co.soramitsu.coredb.model
22
33import androidx.room.Entity
4+ import androidx.room.Index
45import androidx.room.PrimaryKey
56
6- @Entity(tableName = " address_book" )
7+ @Entity(
8+ tableName = " address_book" ,
9+ indices = [Index (value = [" address" , " chainId" ], unique = true )]
10+ )
711data class AddressBookContact (
812 val address : String ,
913 val name : String? ,
You can’t perform that action at this time.
0 commit comments