Skip to content

Commit

Permalink
VersionCode: 41
Browse files Browse the repository at this point in the history
Fixed double click back button error
Fixed Prevent text from being obscured not work as expected
Disable edit when slide the screen
  • Loading branch information
Z-Siqi committed Nov 25, 2023
1 parent 9695841 commit 30af8d3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.sqz.writingboard"
minSdk 29
targetSdk 34
versionCode 40
versionName "0.4.0"
versionCode 41
versionName "0.4.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 40,
"versionName": "0.4.0",
"versionCode": 41,
"versionName": "0.4.1",
"outputFile": "app-release.apk"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ fun WritingBoardLayout(navController: NavController, modifier: Modifier = Modifi
focusManager.clearFocus()
valueState.doneAction = true
}
screenController = false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
Expand Down Expand Up @@ -351,7 +353,13 @@ fun WritingBoardSetting(
)
},
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
var fixDoubleClickError by remember { mutableStateOf(true) }
IconButton(onClick = {
if (fixDoubleClickError) {
navController.popBackStack()
fixDoubleClickError = false
}
}) {
Icon(
painter = painterResource(R.drawable.ic_arrow_back),
contentDescription = "Back"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/sqz/writingboard/ui/WritingBoardText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.os.Looper
import android.util.Log
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.ScrollState
import androidx.compose.foundation.gestures.detectVerticalDragGestures
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.BasicText
Expand All @@ -20,6 +21,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.onFocusEvent
import androidx.compose.ui.input.pointer.pointerInput
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
Expand Down Expand Up @@ -201,6 +203,9 @@ fun WritingBoardText(scrollState: ScrollState, modifier: Modifier = Modifier) {
if (focusState.isFocused) {
valueState.isEditing = true
}
}
.pointerInput(Unit) {
detectVerticalDragGestures { _, _ -> }
},
textStyle = TextStyle.Default.copy(
fontSize = fontSize,
Expand Down

0 comments on commit 30af8d3

Please sign in to comment.