@@ -5,10 +5,18 @@ import android.util.Log
5
5
import androidx.activity.compose.setContent
6
6
import androidx.activity.enableEdgeToEdge
7
7
import androidx.compose.foundation.isSystemInDarkTheme
8
+ import androidx.compose.material3.AlertDialog
9
+ import androidx.compose.material3.Text
10
+ import androidx.compose.material3.TextButton
11
+ import androidx.compose.runtime.getValue
12
+ import androidx.compose.runtime.mutableStateOf
13
+ import androidx.compose.runtime.remember
14
+ import androidx.compose.runtime.setValue
8
15
import androidx.fragment.app.FragmentActivity
9
16
import androidx.navigation.NavController
10
17
import dagger.hilt.android.AndroidEntryPoint
11
18
import dev.medzik.android.utils.openEmailApplication
19
+ import dev.medzik.android.utils.showToast
12
20
import dev.medzik.librepass.android.business.VaultCache
13
21
import dev.medzik.librepass.android.common.popUpToDestination
14
22
import dev.medzik.librepass.android.database.Repository
@@ -48,11 +56,37 @@ class MainActivity : FragmentActivity() {
48
56
// retrieves aes key for vault decryption if key is valid
49
57
vault.getSecretsIfNotExpired(this )
50
58
59
+ this .showToast(" This application is deprecated." )
60
+
51
61
setContent {
52
62
LibrePassTheme (
53
63
darkTheme = isSystemInDarkTheme(),
54
64
dynamicColor = true
55
65
) {
66
+ var showDeprecatedWarning by remember { mutableStateOf(true ) }
67
+ if (showDeprecatedWarning) {
68
+ AlertDialog (
69
+ onDismissRequest = {
70
+ showDeprecatedWarning = false
71
+ },
72
+ confirmButton = {
73
+ TextButton (
74
+ onClick = {
75
+ showDeprecatedWarning = false
76
+ }
77
+ ) {
78
+ Text (" OK" )
79
+ }
80
+ },
81
+ title = {
82
+ Text (" Warning" )
83
+ },
84
+ text = {
85
+ Text (" This application is deprecated. Please migrate all passwords before December 2024" )
86
+ }
87
+ )
88
+ }
89
+
56
90
LibrePassNavigation ()
57
91
}
58
92
}
0 commit comments