mirror of
https://github.com/twofas/2fas-android.git
synced 2024-11-24 19:30:05 +01:00
Merge branch 'release/5.0.1' into main
This commit is contained in:
commit
ce45d16601
@ -17,8 +17,8 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.twofasapp"
|
||||
versionName = "5.0.0"
|
||||
versionCode = 5000003
|
||||
versionName = "5.0.1"
|
||||
versionCode = 5000004
|
||||
|
||||
val versionCodeOffset = 5000000
|
||||
|
||||
|
@ -9,11 +9,14 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":base"))
|
||||
implementation(project(":prefs"))
|
||||
implementation(project(":core:common"))
|
||||
implementation(project(":core:android"))
|
||||
implementation(project(":core:locale"))
|
||||
implementation(project(":core:designsystem"))
|
||||
implementation(project(":data:services"))
|
||||
implementation(project(":data:session"))
|
||||
|
||||
implementation(libs.bundles.viewModel)
|
||||
implementation(libs.bundles.glance)
|
||||
|
@ -6,11 +6,27 @@ import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import com.twofasapp.base.AuthTracker
|
||||
import com.twofasapp.base.lifecycle.AuthAware
|
||||
import com.twofasapp.base.lifecycle.AuthLifecycle
|
||||
import com.twofasapp.data.session.SettingsRepository
|
||||
import com.twofasapp.designsystem.MainAppTheme
|
||||
import com.twofasapp.designsystem.activity.ActivityHelper
|
||||
import org.koin.android.ext.android.get
|
||||
import org.koin.android.ext.android.inject
|
||||
import org.koin.core.parameter.parametersOf
|
||||
|
||||
class WidgetSettingsActivity : ComponentActivity() {
|
||||
class WidgetSettingsActivity : ComponentActivity(), AuthAware {
|
||||
|
||||
private val settingsRepository: SettingsRepository by inject()
|
||||
private val authTracker: AuthTracker by inject()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
ActivityHelper.onCreate(
|
||||
activity = this,
|
||||
selectedTheme = settingsRepository.getAppSettings().selectedTheme,
|
||||
allowScreenshots = settingsRepository.getAppSettings().allowScreenshots,
|
||||
)
|
||||
super.onCreate(savedInstanceState)
|
||||
val appWidgetId = intent?.extras?.getInt(
|
||||
AppWidgetManager.EXTRA_APPWIDGET_ID,
|
||||
@ -20,6 +36,16 @@ class WidgetSettingsActivity : ComponentActivity() {
|
||||
val resultValue = Intent().putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId)
|
||||
setResult(Activity.RESULT_CANCELED, resultValue)
|
||||
|
||||
authTracker.onWidgetSettingsScreen()
|
||||
|
||||
lifecycle.addObserver(
|
||||
AuthLifecycle(
|
||||
authTracker = get(),
|
||||
navigator = get { parametersOf(this) },
|
||||
authAware = this as? AuthAware
|
||||
)
|
||||
)
|
||||
|
||||
setContent {
|
||||
MainAppTheme {
|
||||
WidgetSettingsScreen(
|
||||
@ -31,4 +57,6 @@ class WidgetSettingsActivity : ComponentActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAuthenticated() = Unit
|
||||
}
|
Loading…
Reference in New Issue
Block a user