bump versions
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package app.omnivore.omnivore.feature
|
||||
package app.omnivore.omnivore.utils
|
||||
|
||||
import android.content.Context
|
||||
import androidx.annotation.StringRes
|
||||
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user