Skip to content

Commit

Permalink
Merge pull request #3776 from omnivore-app/fix/android-notes
Browse files Browse the repository at this point in the history
Keyboard options on the note view
  • Loading branch information
jacksonh authored Apr 8, 2024
2 parents c9234b5 + 3e2dc0b commit f03ae00
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.Context
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.*
import androidx.compose.material3.*
Expand Down Expand Up @@ -42,6 +43,7 @@ import app.omnivore.omnivore.core.database.entities.Highlight
import app.omnivore.omnivore.feature.theme.OmnivoreTheme
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.KeyboardCapitalization


fun notebookMD(notes: List<Highlight>, highlights: List<Highlight>): String {
Expand Down Expand Up @@ -185,11 +187,17 @@ fun EditNoteModal(initialValue: String?, onDismiss: (save: Boolean, text: String
.padding(top = paddingValues.calculateTopPadding())
.focusRequester(focusRequester)
.fillMaxSize(),
keyboardOptions = KeyboardOptions.Default.copy(
autoCorrect = true,
capitalization = KeyboardCapitalization.Sentences
),
value = annotation.value, onValueChange = { annotation.value = it },
colors = TextFieldDefaults.textFieldColors(
focusedTextColor = MaterialTheme.colorScheme.onSurface,
unfocusedTextColor = MaterialTheme.colorScheme.onSurface,
)

),
)
}
}
Expand Down

0 comments on commit f03ae00

Please sign in to comment.