Skip to content

Commit

Permalink
Merge branch 'release/5.3.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rafakob committed Feb 6, 2024
2 parents c3f4d92 + 7e750ad commit 1e5e2c9
Show file tree
Hide file tree
Showing 91 changed files with 1,030 additions and 198 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {

defaultConfig {
applicationId = "com.twofasapp"
versionName = "5.2.0"
versionCode = 5000012
versionName = "5.3.0"
versionCode = 5000016

val versionCodeOffset = 5000000

Expand Down
296 changes: 296 additions & 0 deletions app/schemas/com.twofasapp.storage.AppDatabase/13.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
{
"formatVersion": 1,
"database": {
"version": 13,
"identityHash": "00659315e21cc36273e2fcd4ae35ce93",
"entities": [
{
"tableName": "local_services",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `secret` TEXT NOT NULL, `serviceTypeId` TEXT, `iconCollectionId` TEXT, `source` TEXT, `otpLink` TEXT, `otpLabel` TEXT, `otpAccount` TEXT, `otpIssuer` TEXT, `otpDigits` INTEGER, `otpPeriod` INTEGER, `otpAlgorithm` TEXT, `backupSyncStatus` TEXT NOT NULL, `updatedAt` INTEGER NOT NULL, `badgeColor` TEXT, `selectedImageType` TEXT, `labelText` TEXT, `labelBackgroundColor` TEXT, `groupId` TEXT, `isDeleted` INTEGER, `authType` TEXT, `hotpCounter` INTEGER, `hotpCounterTimestamp` INTEGER, `revealTimestamp` INTEGER, `assignedDomains` TEXT)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "secret",
"columnName": "secret",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceTypeId",
"columnName": "serviceTypeId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "iconCollectionId",
"columnName": "iconCollectionId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "source",
"columnName": "source",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "otpLink",
"columnName": "otpLink",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "otpLabel",
"columnName": "otpLabel",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "otpAccount",
"columnName": "otpAccount",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "otpIssuer",
"columnName": "otpIssuer",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "otpDigits",
"columnName": "otpDigits",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "otpPeriod",
"columnName": "otpPeriod",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "otpAlgorithm",
"columnName": "otpAlgorithm",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "backupSyncStatus",
"columnName": "backupSyncStatus",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "updatedAt",
"columnName": "updatedAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "badgeColor",
"columnName": "badgeColor",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "selectedImageType",
"columnName": "selectedImageType",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "labelText",
"columnName": "labelText",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "labelBackgroundColor",
"columnName": "labelBackgroundColor",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "groupId",
"columnName": "groupId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "isDeleted",
"columnName": "isDeleted",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "authType",
"columnName": "authType",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "hotpCounter",
"columnName": "hotpCounter",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "hotpCounterTimestamp",
"columnName": "hotpCounterTimestamp",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "revealTimestamp",
"columnName": "revealTimestamp",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "assignedDomains",
"columnName": "assignedDomains",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "paired_browsers",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `extensionPublicKey` TEXT NOT NULL, `pairedAt` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "extensionPublicKey",
"columnName": "extensionPublicKey",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "pairedAt",
"columnName": "pairedAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "notifications",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `category` TEXT NOT NULL, `link` TEXT NOT NULL, `message` TEXT NOT NULL, `publishTime` INTEGER NOT NULL, `push` INTEGER NOT NULL, `platform` TEXT NOT NULL, `isRead` INTEGER NOT NULL, `periodicType` TEXT, `internalRoute` TEXT, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "link",
"columnName": "link",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "message",
"columnName": "message",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "publishTime",
"columnName": "publishTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "push",
"columnName": "push",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "platform",
"columnName": "platform",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isRead",
"columnName": "isRead",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "periodicType",
"columnName": "periodicType",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "internalRoute",
"columnName": "internalRoute",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '00659315e21cc36273e2fcd4ae35ce93')"
]
}
}
3 changes: 2 additions & 1 deletion app/src/main/java/com/twofasapp/storage/AppDatabase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ import java.text.Normalizer
autoMigrations = [
AutoMigration(from = 7, to = 8),
AutoMigration(from = 8, to = 9),
AutoMigration(from = 12, to = 13),
]
)
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
companion object {
const val DB_VERSION = 12
const val DB_VERSION = 13
}

abstract fun serviceDao(): ServiceDao
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/com/twofasapp/ui/main/StartActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import com.twofasapp.base.lifecycle.AuthAware
import com.twofasapp.base.lifecycle.AuthLifecycle
import com.twofasapp.data.session.SettingsRepository
import com.twofasapp.designsystem.AppThemeState
import com.twofasapp.workmanager.SyncTimeWorkDispatcher
import com.twofasapp.workmanager.OnAppStartWork
import com.twofasapp.workmanager.OnAppUpdatedWorkDispatcher
import com.twofasapp.workmanager.SyncTimeWorkDispatcher
import org.koin.android.ext.android.get
import org.koin.android.ext.android.inject
import org.koin.core.parameter.parametersOf
Expand All @@ -32,6 +33,7 @@ class StartActivity : AppCompatActivity(), AuthAware {

onAppUpdatedWorkDispatcher.dispatch()
syncTimeWorkDispatcher.dispatch()
OnAppStartWork.dispatch(this)

if (savedInstanceState == null) {
authTracker.onSplashScreen()
Expand Down
Loading

0 comments on commit 1e5e2c9

Please sign in to comment.