Skip to content

Commit 4c23e00

Browse files
committed
feat(ui):made the entire content area clickable to activate the keyboard
1 parent 4ec1da0 commit 4c23e00

File tree

6 files changed

+60
-16
lines changed

6 files changed

+60
-16
lines changed

.idea/caches/deviceStreaming.xml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ android {
1111

1212
defaultConfig {
1313
applicationId "com.opennotes"
14-
minSdk 24
15-
targetSdk 35
14+
minSdk 26
15+
targetSdk 36
1616
versionCode 6
1717
versionName "1.3.2"
1818

app/src/main/java/com/opennotes/feature_node/presentation/add_edit_note/AddEditNoteScreen.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.compose.animation.core.tween
55
import androidx.compose.foundation.background
66
import androidx.compose.foundation.border
77
import androidx.compose.foundation.clickable
8+
import androidx.compose.foundation.interaction.MutableInteractionSource
89
import androidx.compose.foundation.layout.*
910
import androidx.compose.foundation.shape.CircleShape
1011
import androidx.compose.material.icons.Icons
@@ -16,6 +17,8 @@ import androidx.compose.runtime.*
1617
import androidx.compose.ui.Modifier
1718
import androidx.compose.ui.draw.clip
1819
import androidx.compose.ui.draw.shadow
20+
import androidx.compose.ui.focus.FocusRequester
21+
import androidx.compose.ui.focus.focusRequester
1922
import androidx.compose.ui.graphics.Color
2023
import androidx.compose.ui.graphics.toArgb
2124
import androidx.compose.ui.unit.dp
@@ -46,6 +49,9 @@ fun AddEditNoteScreen(
4649

4750
val scope = rememberCoroutineScope()
4851

52+
val focusRequester = remember { FocusRequester() }
53+
val interactionSource = remember { MutableInteractionSource() }
54+
4955
LaunchedEffect(key1 = true) {
5056
viewModel.eventFlow.collectLatest { event ->
5157
when (event) {
@@ -57,7 +63,6 @@ fun AddEditNoteScreen(
5763
navController.navigateUp()
5864
}
5965

60-
else -> {}
6166
}
6267
}
6368
}
@@ -168,7 +173,15 @@ fun AddEditNoteScreen(
168173
isHintVisible = contentState.isHintVisible,
169174
singleLine = false,
170175
textStyle = MaterialTheme.typography.bodyLarge,
171-
modifier = Modifier.fillMaxSize()
176+
modifier = Modifier
177+
.fillMaxSize()
178+
.focusRequester(focusRequester)
179+
.clickable(
180+
interactionSource = interactionSource,
181+
indication = null
182+
) {
183+
focusRequester.requestFocus()
184+
}
172185
)
173186
}
174187
}

app/src/main/java/com/opennotes/feature_node/presentation/add_edit_note/components/markdown/Builder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fun splitByDelimiter(input: String, delimiter: String): List<Pair<Int, Int>> {
4848
while (delimiterIndex != -1) {
4949
if (startIndex != delimiterIndex) {
5050
segments.add(Pair(startIndex, delimiterIndex))
51-
A } else {
51+
} else {
5252
segments.add(Pair(startIndex, startIndex))
5353
}
5454
startIndex = delimiterIndex + delimiter.length

app/src/main/java/com/opennotes/feature_node/presentation/settings/About.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@ fun AboutScreen(navController: NavController, settingsViewModel: SettingsViewMod
5757
)
5858
}
5959

60-
61-
6260
item {
6361
SettingItem(
6462
title = "Source Code",
6563
icon = Icons.Filled.Language,
6664
onClick = {
67-
uriHandler.openUri("")
65+
uriHandler.openUri("https://github.com/Fandroid745/Open-notes.git")
6866
},
6967
isLast = true
7068
)

0 commit comments

Comments
 (0)