mirror of
https://github.com/yogeshpaliyal/KeyPass.git
synced 2026-01-06 00:59:34 -06:00
kill application on back press (#739)
* kill application on back press * fix: spotless
This commit is contained in:
committed by
GitHub
parent
5ea20b73e3
commit
b060599efc
@@ -89,6 +89,10 @@ class DashboardComposeActivity : AppCompatActivity() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -104,7 +108,7 @@ fun Dashboard() {
|
||||
|
||||
LaunchedEffect(key1 = systemBackPress, block = {
|
||||
if (systemBackPress) {
|
||||
(context as? ComponentActivity)?.onBackPressed()
|
||||
(context as? ComponentActivity)?.finishAffinity()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.yogeshpaliyal.keypass.utils
|
||||
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
|
||||
/**
|
||||
* Alias to represent a folder (a String title) into which emails can be placed.
|
||||
*/
|
||||
|
||||
object StringDiffUtil : DiffUtil.ItemCallback<String>() {
|
||||
override fun areItemsTheSame(oldItem: String, newItem: String) = oldItem == newItem
|
||||
override fun areContentsTheSame(oldItem: String, newItem: String) = oldItem == newItem
|
||||
}
|
||||
Reference in New Issue
Block a user