Update dependencies

Kotlin to 1.6.0 and Jetpack Compose to 1.1.0-beta04
This commit is contained in:
MM20 2021-12-11 21:27:20 +01:00
parent 28303b9276
commit 6a24eb017f
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
11 changed files with 29 additions and 24 deletions

View File

@ -43,8 +43,8 @@ dependencyResolutionManagement {
version("targetSdk", "31")
}
create("libs") {
version("kotlin", "1.5.31")
version("kotlinx.coroutines", "1.5.1")
version("kotlin", "1.6.0")
version("kotlinx.coroutines", "1.6.0-RC2")
alias("kotlin.stdlib")
.to("org.jetbrains.kotlin", "kotlin-stdlib")
.versionRef("kotlin")
@ -62,7 +62,7 @@ dependencyResolutionManagement {
listOf("kotlin.stdlib", "kotlinx.coroutines.core", "kotlinx.coroutines.android")
)
version("androidx.compose", "1.1.0-beta02")
version("androidx.compose", "1.1.0-beta04")
alias("androidx.compose.runtime")
.to("androidx.compose.runtime", "runtime")
.versionRef("androidx.compose")
@ -98,7 +98,7 @@ dependencyResolutionManagement {
.versionRef("androidx.compose")
alias("androidx.compose.material3")
.to("androidx.compose.material3", "material3")
.version("1.0.0-alpha01")
.version("1.0.0-alpha02")
version("androidx.lifecycle", "2.4.0-rc01")
alias("androidx.lifecycle.viewmodel")
@ -220,7 +220,7 @@ dependencyResolutionManagement {
.to("androidx.datastore", "datastore")
.version("1.0.0")
version("androidx.room", "2.4.0-beta02")
version("androidx.room", "2.4.0-rc01")
alias("androidx.roomruntime")
.to("androidx.room", "room-runtime")
.versionRef("androidx.room")

View File

@ -10,13 +10,16 @@ import de.mm20.launcher2.icons.IconRepository
import de.mm20.launcher2.ktx.dp
import de.mm20.launcher2.ktx.lifecycleScope
import de.mm20.launcher2.ui.databinding.EditFavoritesRowBinding
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
class EditFavoritesRow @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0, val favoritesItem: FavoritesItem
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
val favoritesItem: FavoritesItem
) : LinearLayout(context, attrs, defStyleAttr), KoinComponent {
val iconRepository: IconRepository by inject()
@ -26,7 +29,7 @@ class EditFavoritesRow @JvmOverloads constructor(
init {
binding.label.text = favoritesItem.searchable?.label
lifecycleScope.launch {
iconRepository.getIcon(favoritesItem.searchable!!, (48*dp).toInt()).collect{
iconRepository.getIcon(favoritesItem.searchable!!, (48 * dp).toInt()).collectLatest {
binding.icon.icon = it
}
}

View File

@ -52,6 +52,7 @@ import de.mm20.launcher2.ui.R
import de.mm20.launcher2.ui.legacy.searchable.SearchableView
import de.mm20.launcher2.ui.legacy.view.*
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.component.KoinComponent
@ -82,7 +83,7 @@ class ApplicationDetailRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(application)
lifecycleScope.launch {
iconRepository.getIcon(application, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(application, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -12,7 +12,7 @@ import de.mm20.launcher2.search.data.Searchable
import de.mm20.launcher2.ui.R
import de.mm20.launcher2.ui.legacy.searchable.SearchableView
import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -54,7 +54,7 @@ class BasicGridRepresentation : Representation, KoinComponent {
}
icon = iconRepository.getIconIfCached(searchable)
lifecycleScope.launch {
iconRepository.getIcon(searchable, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(searchable, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -25,7 +25,7 @@ import de.mm20.launcher2.search.data.Searchable
import de.mm20.launcher2.ui.R
import de.mm20.launcher2.ui.legacy.searchable.SearchableView
import de.mm20.launcher2.ui.legacy.view.*
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -52,7 +52,7 @@ class ContactDetailRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(contact)
lifecycleScope.launch {
iconRepository.getIcon(contact, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(contact, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -15,7 +15,7 @@ import de.mm20.launcher2.ui.legacy.view.FavoriteSwipeAction
import de.mm20.launcher2.ui.legacy.view.HideSwipeAction
import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import de.mm20.launcher2.ui.legacy.view.SwipeCardView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -36,7 +36,7 @@ class ContactListRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(contact)
lifecycleScope.launch {
iconRepository.getIcon(contact, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(contact, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -6,7 +6,6 @@ import android.provider.MediaStore
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.FileProvider
import androidx.lifecycle.ViewModelProvider
import androidx.transition.Scene
import com.afollestad.materialdialogs.MaterialDialog
import de.mm20.launcher2.ui.R
@ -20,7 +19,7 @@ import de.mm20.launcher2.search.data.GDriveFile
import de.mm20.launcher2.search.data.Searchable
import de.mm20.launcher2.ui.legacy.searchable.SearchableView
import de.mm20.launcher2.ui.legacy.view.*
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.koin.core.component.KoinComponent
@ -45,7 +44,7 @@ class FileDetailRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(file)
lifecycleScope.launch {
iconRepository.getIcon(file, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(file, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -17,7 +17,7 @@ import de.mm20.launcher2.ui.legacy.view.FavoriteSwipeAction
import de.mm20.launcher2.ui.legacy.view.HideSwipeAction
import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import de.mm20.launcher2.ui.legacy.view.SwipeCardView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -40,7 +40,7 @@ class FileListRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(file)
lifecycleScope.launch {
iconRepository.getIcon(file, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(file, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -17,7 +17,7 @@ import de.mm20.launcher2.ui.legacy.view.FavoriteToolbarAction
import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import de.mm20.launcher2.ui.legacy.view.ToolbarAction
import de.mm20.launcher2.ui.legacy.view.ToolbarView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -42,7 +42,7 @@ class AppShortcutDetailRepresentation: Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(appShortcut)
lifecycleScope.launch {
iconRepository.getIcon(appShortcut, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(appShortcut, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -23,6 +23,7 @@ import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import de.mm20.launcher2.ui.legacy.view.ToolbarAction
import de.mm20.launcher2.ui.legacy.view.ToolbarView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -70,7 +71,7 @@ class WebsiteDetailRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(website)
lifecycleScope.launch {
iconRepository.getIcon(website, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(website, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}

View File

@ -23,6 +23,7 @@ import de.mm20.launcher2.ui.legacy.view.LauncherIconView
import de.mm20.launcher2.ui.legacy.view.ToolbarAction
import de.mm20.launcher2.ui.legacy.view.ToolbarView
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
@ -75,7 +76,7 @@ class WebsiteListRepresentation : Representation, KoinComponent {
shape = LauncherIconView.getDefaultShape(context)
icon = iconRepository.getIconIfCached(website)
lifecycleScope.launch {
iconRepository.getIcon(website, (84 * rootView.dp).toInt()).collect {
iconRepository.getIcon(website, (84 * rootView.dp).toInt()).collectLatest {
icon = it
}
}