Update lifecycle-viewmodel to 2.7.0
This commit is contained in:
parent
8f88809e5f
commit
67a7eb8391
5 changed files with 6 additions and 8 deletions
|
|
@ -58,8 +58,8 @@ dependencies {
|
|||
implementation("androidx.fragment:fragment:1.6.2")
|
||||
implementation("androidx.fragment:fragment-ktx:1.6.2")
|
||||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel:2.6.2")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel:2.7.0")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
|
||||
implementation("androidx.preference:preference:1.2.1")
|
||||
implementation("androidx.preference:preference-ktx:1.2.1")
|
||||
// Material Design
|
||||
|
|
|
|||
|
|
@ -6,12 +6,10 @@ import android.content.Context
|
|||
import cn.super12138.todo.logic.dao.ToDoRoomDB
|
||||
import cn.super12138.todo.views.crash.CrashHandler
|
||||
import com.google.android.material.color.DynamicColors
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class ToDoApplication : Application() {
|
||||
private val database by lazy { ToDoRoomDB.getDatabase(this) }
|
||||
|
||||
companion object {
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
lateinit var context: Context
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ object SPHelper {
|
|||
PreferenceManager.getDefaultSharedPreferences(context /* Activity context */)
|
||||
return sharedPreferences.getString(name, defaultValue)
|
||||
}
|
||||
fun getPreferenceBoolean(context: Context, name: String, defaultValue: Boolean): Boolean? {
|
||||
|
||||
fun getPreferenceBoolean(context: Context, name: String, defaultValue: Boolean): Boolean {
|
||||
val sharedPreferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(context /* Activity context */)
|
||||
return sharedPreferences.getBoolean(name, defaultValue)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
package cn.super12138.todo.logic.model
|
||||
|
||||
data class ToDo(val uuid: String, val content: String, val subject: String){
|
||||
data class ToDo(val uuid: String, val content: String, val subject: String) {
|
||||
var isAnimated = false
|
||||
}
|
||||
|
|
@ -64,7 +64,6 @@ class MainActivity : BaseActivity() {
|
|||
)
|
||||
|
||||
false -> window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
else -> window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue