Hide keyboard when exiting the room screen (#1593)
This commit is contained in:
parent
7c04f27092
commit
643fe1a5e5
2 changed files with 10 additions and 0 deletions
1
changelog.d/1375.bugfix
Normal file
1
changelog.d/1375.bugfix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Hide keyboard when exiting the chat room screen.
|
||||||
|
|
@ -35,6 +35,7 @@ import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.DisposableEffect
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -222,6 +223,14 @@ fun MessagesView(
|
||||||
ReinviteDialog(
|
ReinviteDialog(
|
||||||
state = state
|
state = state
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Since the textfield is now based on an Android view, this is no longer done automatically.
|
||||||
|
// We need to hide the keyboard automatically when navigating out of this screen.
|
||||||
|
DisposableEffect(Unit) {
|
||||||
|
onDispose {
|
||||||
|
localView.hideKeyboard()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue