bump versions

This commit is contained in:
Stefano Sansone
2024-04-18 01:47:08 +02:00
parent 75fe34ee78
commit 83d8fa9351
3 changed files with 54 additions and 56 deletions

View File

@ -15,55 +15,53 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDE
import com.google.android.material.bottomsheet.BottomSheetDialog
class AnnotationEditFragment : DialogFragment() {
private var onSave: (String) -> Unit = {}
private var onCancel: () -> Unit = {}
private var initialAnnotation: String = ""
private var onSave: (String) -> Unit = {}
private var onCancel: () -> Unit = {}
private var initialAnnotation: String = ""
fun configure(
initialAnnotation: String,
onSave: (String) -> Unit,
onCancel: () -> Unit,
) {
this.initialAnnotation = initialAnnotation
this.onSave = onSave
this.onCancel = onCancel
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
return ComposeView(requireContext()).apply {
(dialog as? BottomSheetDialog)?.let {
it.behavior.skipCollapsed = true
it.behavior.state = STATE_EXPANDED
}
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
OmnivoreTheme {
EditNoteModal(initialValue = initialAnnotation, onDismiss = { save, text ->
if (save) {
onSave(text ?: "")
} else {
onCancel()
}
dismissNow()
})
}
}
fun configure(
initialAnnotation: String,
onSave: (String) -> Unit,
onCancel: () -> Unit,
) {
this.initialAnnotation = initialAnnotation
this.onSave = onSave
this.onCancel = onCancel
}
}
override fun onDismiss(dialog: DialogInterface) {
onCancel()
super.onDismiss(dialog)
}
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View {
return ComposeView(requireContext()).apply {
(dialog as? BottomSheetDialog)?.let {
it.behavior.skipCollapsed = true
it.behavior.state = STATE_EXPANDED
}
dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
OmnivoreTheme {
EditNoteModal(initialValue = initialAnnotation, onDismiss = { save, text ->
if (save) {
onSave(text ?: "")
} else {
onCancel()
}
dismissNow()
})
}
}
}
}
override fun onDismiss(dialog: DialogInterface) {
onCancel()
super.onDismiss(dialog)
}
}

View File

@ -1,4 +1,4 @@
package app.omnivore.omnivore.feature
package app.omnivore.omnivore.utils
import android.content.Context
import androidx.annotation.StringRes

View File

@ -2,19 +2,19 @@
accompanistSystemUiController = "0.34.0"
accompanistFlowLayout = "0.32.0"
androidGradlePlugin = "8.3.2"
androidxActivity = "1.8.2"
androidxActivity = "1.9.0"
androidxAppCompat = "1.6.1"
androidxComposeBom = "2024.04.00"
androidxComposeBom = "2024.04.01"
androidxComposeCompiler = "1.5.9"
androidxCore = "1.12.0"
androidxDataStore = "1.0.0"
androidxCore = "1.13.0"
androidxDataStore = "1.1.0"
androidxEspresso = "3.5.1"
androidxHiltNavigationCompose = "1.2.0"
androidxLifecycle = "2.7.0"
androidxNavigation = "2.7.7"
androidxSecurity = "1.0.0"
androidxTestExt = "1.1.5"
apollo = "3.8.2"
apollo = "3.8.3"
chiptextfieldM3 = "0.6.5"
coil = "2.6.0"
composeMarkdown = "0.3.3"
@ -26,8 +26,8 @@ junit4 = "4.13.2"
kotlin = "1.9.22"
ksp = "1.9.22-1.0.18"
kotlinxCoroutines = "1.8.0"
playServices = "18.3.0"
playServicesAuth = "21.0.0"
playServices = "18.4.0"
playServicesAuth = "21.1.0"
posthog = "2.0.3"
pspdfkit = "8.9.1"
retrofit = "2.9.0"