Show a prompt to reinvite other party in a DM

If you are looking at a DM where the other party has left then
when you focus the composer for the first time we'll show a
dialog asking if you want to reinvite the other party.

Closes #590
This commit is contained in:
Chris Smith 2023-06-27 11:36:14 +01:00
parent 2ce614ae97
commit 53861fedb6
18 changed files with 327 additions and 6 deletions

View file

@ -53,6 +53,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.focus.onFocusEvent
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.SolidColor
@ -93,6 +94,7 @@ fun TextComposer(
onResetComposerMode: () -> Unit = {},
onComposerTextChange: (CharSequence) -> Unit = {},
onAddAttachment: () -> Unit = {},
onFocusChanged: (Boolean) -> Unit = {},
) {
val text = composerText.orEmpty()
Row(
@ -129,7 +131,8 @@ fun TextComposer(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = minHeight)
.focusRequester(focusRequester),
.focusRequester(focusRequester)
.onFocusEvent { onFocusChanged(it.hasFocus) },
value = text,
onValueChange = { onComposerTextChange(it) },
onTextLayout = {