Reactivating hold to edit draft.
This commit is contained in:
@@ -105,6 +105,7 @@ fun ChatroomMessageCompose(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
) {
|
) {
|
||||||
WatchNoteEvent(baseNote = baseNote, accountViewModel = accountViewModel) {
|
WatchNoteEvent(baseNote = baseNote, accountViewModel = accountViewModel) {
|
||||||
WatchBlockAndReport(
|
WatchBlockAndReport(
|
||||||
@@ -123,6 +124,7 @@ fun ChatroomMessageCompose(
|
|||||||
accountViewModel,
|
accountViewModel,
|
||||||
nav,
|
nav,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,6 +141,7 @@ fun NormalChatNote(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
) {
|
) {
|
||||||
val drawAuthorInfo by
|
val drawAuthorInfo by
|
||||||
remember(note) {
|
remember(note) {
|
||||||
@@ -252,6 +255,7 @@ fun NormalChatNote(
|
|||||||
innerQuote,
|
innerQuote,
|
||||||
backgroundBubbleColor,
|
backgroundBubbleColor,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
canPreview,
|
canPreview,
|
||||||
availableBubbleSize,
|
availableBubbleSize,
|
||||||
showDetails,
|
showDetails,
|
||||||
@@ -265,7 +269,9 @@ fun NormalChatNote(
|
|||||||
note = note,
|
note = note,
|
||||||
popupExpanded = popupExpanded,
|
popupExpanded = popupExpanded,
|
||||||
onDismiss = { popupExpanded = false },
|
onDismiss = { popupExpanded = false },
|
||||||
|
onWantsToEditDraft = { onWantsToEditDraft(note) },
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
|
nav = nav,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,6 +285,7 @@ private fun RenderBubble(
|
|||||||
innerQuote: Boolean,
|
innerQuote: Boolean,
|
||||||
backgroundBubbleColor: MutableState<Color>,
|
backgroundBubbleColor: MutableState<Color>,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
canPreview: Boolean,
|
canPreview: Boolean,
|
||||||
availableBubbleSize: MutableState<Int>,
|
availableBubbleSize: MutableState<Int>,
|
||||||
showDetails: State<Boolean>,
|
showDetails: State<Boolean>,
|
||||||
@@ -309,6 +316,7 @@ private fun RenderBubble(
|
|||||||
backgroundBubbleColor,
|
backgroundBubbleColor,
|
||||||
bubbleSize,
|
bubbleSize,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
canPreview,
|
canPreview,
|
||||||
showDetails,
|
showDetails,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
@@ -327,6 +335,7 @@ private fun MessageBubbleLines(
|
|||||||
backgroundBubbleColor: MutableState<Color>,
|
backgroundBubbleColor: MutableState<Color>,
|
||||||
bubbleSize: MutableState<Int>,
|
bubbleSize: MutableState<Int>,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
canPreview: Boolean,
|
canPreview: Boolean,
|
||||||
showDetails: State<Boolean>,
|
showDetails: State<Boolean>,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
@@ -349,6 +358,7 @@ private fun MessageBubbleLines(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,6 +367,7 @@ private fun MessageBubbleLines(
|
|||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
innerQuote = innerQuote,
|
innerQuote = innerQuote,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
backgroundBubbleColor = backgroundBubbleColor,
|
backgroundBubbleColor = backgroundBubbleColor,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
@@ -403,9 +414,10 @@ private fun RenderReplyRow(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
) {
|
) {
|
||||||
if (!innerQuote && note.replyTo?.lastOrNull() != null) {
|
if (!innerQuote && note.replyTo?.lastOrNull() != null) {
|
||||||
RenderReply(note, backgroundBubbleColor, accountViewModel, nav, onWantsToReply)
|
RenderReply(note, backgroundBubbleColor, accountViewModel, nav, onWantsToReply, onWantsToEditDraft)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,6 +428,7 @@ private fun RenderReply(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
) {
|
) {
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
val replyTo =
|
val replyTo =
|
||||||
@@ -434,6 +447,7 @@ private fun RenderReply(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -445,6 +459,7 @@ private fun NoteRow(
|
|||||||
canPreview: Boolean,
|
canPreview: Boolean,
|
||||||
innerQuote: Boolean,
|
innerQuote: Boolean,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
backgroundBubbleColor: MutableState<Color>,
|
backgroundBubbleColor: MutableState<Color>,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
@@ -463,6 +478,7 @@ private fun NoteRow(
|
|||||||
canPreview,
|
canPreview,
|
||||||
innerQuote,
|
innerQuote,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
backgroundBubbleColor,
|
backgroundBubbleColor,
|
||||||
accountViewModel,
|
accountViewModel,
|
||||||
nav,
|
nav,
|
||||||
@@ -488,6 +504,7 @@ private fun RenderDraftEvent(
|
|||||||
canPreview: Boolean,
|
canPreview: Boolean,
|
||||||
innerQuote: Boolean,
|
innerQuote: Boolean,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
backgroundBubbleColor: MutableState<Color>,
|
backgroundBubbleColor: MutableState<Color>,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
@@ -501,6 +518,7 @@ private fun RenderDraftEvent(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
|
|
||||||
NoteRow(
|
NoteRow(
|
||||||
@@ -508,6 +526,7 @@ private fun RenderDraftEvent(
|
|||||||
canPreview = canPreview,
|
canPreview = canPreview,
|
||||||
innerQuote = innerQuote,
|
innerQuote = innerQuote,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
backgroundBubbleColor = backgroundBubbleColor,
|
backgroundBubbleColor = backgroundBubbleColor,
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import androidx.compose.material.icons.filled.AlternateEmail
|
|||||||
import androidx.compose.material.icons.filled.Block
|
import androidx.compose.material.icons.filled.Block
|
||||||
import androidx.compose.material.icons.filled.ContentCopy
|
import androidx.compose.material.icons.filled.ContentCopy
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
|
import androidx.compose.material.icons.filled.Edit
|
||||||
import androidx.compose.material.icons.filled.FormatQuote
|
import androidx.compose.material.icons.filled.FormatQuote
|
||||||
import androidx.compose.material.icons.filled.PersonAdd
|
import androidx.compose.material.icons.filled.PersonAdd
|
||||||
import androidx.compose.material.icons.filled.PersonRemove
|
import androidx.compose.material.icons.filled.PersonRemove
|
||||||
@@ -137,11 +138,16 @@ fun LongPressToQuickAction(
|
|||||||
) {
|
) {
|
||||||
val popupExpanded = remember { mutableStateOf(false) }
|
val popupExpanded = remember { mutableStateOf(false) }
|
||||||
val showPopup = remember { { popupExpanded.value = true } }
|
val showPopup = remember { { popupExpanded.value = true } }
|
||||||
val hidePopup = remember { { popupExpanded.value = false } }
|
|
||||||
|
|
||||||
content(showPopup)
|
content(showPopup)
|
||||||
|
|
||||||
NoteQuickActionMenu(baseNote, popupExpanded.value, hidePopup, accountViewModel)
|
NoteQuickActionMenu(
|
||||||
|
note = baseNote,
|
||||||
|
popupExpanded = popupExpanded.value,
|
||||||
|
onDismiss = { popupExpanded.value = false },
|
||||||
|
accountViewModel = accountViewModel,
|
||||||
|
nav = {},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -150,12 +156,44 @@ fun NoteQuickActionMenu(
|
|||||||
popupExpanded: Boolean,
|
popupExpanded: Boolean,
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
|
nav: (String) -> Unit,
|
||||||
|
) {
|
||||||
|
val editDraftDialog = remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
if (editDraftDialog.value) {
|
||||||
|
NewPostView(
|
||||||
|
onClose = {
|
||||||
|
editDraftDialog.value = false
|
||||||
|
},
|
||||||
|
accountViewModel = accountViewModel,
|
||||||
|
draft = note,
|
||||||
|
nav = { },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
NoteQuickActionMenu(
|
||||||
|
note = note,
|
||||||
|
popupExpanded = popupExpanded,
|
||||||
|
onDismiss = onDismiss,
|
||||||
|
onWantsToEditDraft = { editDraftDialog.value = true },
|
||||||
|
accountViewModel = accountViewModel,
|
||||||
|
nav = nav,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun NoteQuickActionMenu(
|
||||||
|
note: Note,
|
||||||
|
popupExpanded: Boolean,
|
||||||
|
onDismiss: () -> Unit,
|
||||||
|
onWantsToEditDraft: () -> Unit,
|
||||||
|
accountViewModel: AccountViewModel,
|
||||||
|
nav: (String) -> Unit,
|
||||||
) {
|
) {
|
||||||
val showSelectTextDialog = remember { mutableStateOf(false) }
|
val showSelectTextDialog = remember { mutableStateOf(false) }
|
||||||
val showDeleteAlertDialog = remember { mutableStateOf(false) }
|
val showDeleteAlertDialog = remember { mutableStateOf(false) }
|
||||||
val showBlockAlertDialog = remember { mutableStateOf(false) }
|
val showBlockAlertDialog = remember { mutableStateOf(false) }
|
||||||
val showReportDialog = remember { mutableStateOf(false) }
|
val showReportDialog = remember { mutableStateOf(false) }
|
||||||
val editDraftDialog = remember { mutableStateOf(false) }
|
|
||||||
|
|
||||||
if (popupExpanded) {
|
if (popupExpanded) {
|
||||||
RenderMainPopup(
|
RenderMainPopup(
|
||||||
@@ -165,7 +203,7 @@ fun NoteQuickActionMenu(
|
|||||||
showBlockAlertDialog,
|
showBlockAlertDialog,
|
||||||
showDeleteAlertDialog,
|
showDeleteAlertDialog,
|
||||||
showReportDialog,
|
showReportDialog,
|
||||||
editDraftDialog,
|
onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,17 +240,6 @@ fun NoteQuickActionMenu(
|
|||||||
onDismiss()
|
onDismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editDraftDialog.value) {
|
|
||||||
NewPostView(
|
|
||||||
onClose = {
|
|
||||||
editDraftDialog.value = false
|
|
||||||
},
|
|
||||||
accountViewModel = accountViewModel,
|
|
||||||
draft = note,
|
|
||||||
nav = { },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@@ -223,7 +250,7 @@ private fun RenderMainPopup(
|
|||||||
showBlockAlertDialog: MutableState<Boolean>,
|
showBlockAlertDialog: MutableState<Boolean>,
|
||||||
showDeleteAlertDialog: MutableState<Boolean>,
|
showDeleteAlertDialog: MutableState<Boolean>,
|
||||||
showReportDialog: MutableState<Boolean>,
|
showReportDialog: MutableState<Boolean>,
|
||||||
editDraftDialog: MutableState<Boolean>,
|
onWantsToEditDraft: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val primaryLight = lightenColor(MaterialTheme.colorScheme.primary, 0.1f)
|
val primaryLight = lightenColor(MaterialTheme.colorScheme.primary, 0.1f)
|
||||||
@@ -294,23 +321,6 @@ private fun RenderMainPopup(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (note.isDraft()) {
|
|
||||||
VerticalDivider(color = primaryLight)
|
|
||||||
NoteQuickActionItem(
|
|
||||||
Icons.Default.Edit,
|
|
||||||
stringResource(R.string.edit_draft),
|
|
||||||
) {
|
|
||||||
if (newPostViewModel != null) {
|
|
||||||
newPostViewModel.load(accountViewModel, null, null, null, null, note)
|
|
||||||
onDismiss()
|
|
||||||
} else {
|
|
||||||
editDraftDialog.value = true
|
|
||||||
onDismiss()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (!isOwnNote) {
|
if (!isOwnNote) {
|
||||||
VerticalDivider(color = primaryLight)
|
VerticalDivider(color = primaryLight)
|
||||||
|
|
||||||
@@ -371,31 +381,41 @@ private fun RenderMainPopup(
|
|||||||
onDismiss()
|
onDismiss()
|
||||||
}
|
}
|
||||||
VerticalDivider(color = primaryLight)
|
VerticalDivider(color = primaryLight)
|
||||||
NoteQuickActionItem(
|
if (isOwnNote && note.isDraft()) {
|
||||||
icon = Icons.Default.Share,
|
NoteQuickActionItem(
|
||||||
label = stringResource(R.string.quick_action_share),
|
Icons.Default.Edit,
|
||||||
) {
|
stringResource(R.string.edit_draft),
|
||||||
val sendIntent =
|
) {
|
||||||
Intent().apply {
|
onDismiss()
|
||||||
action = Intent.ACTION_SEND
|
onWantsToEditDraft()
|
||||||
type = "text/plain"
|
}
|
||||||
putExtra(
|
} else {
|
||||||
Intent.EXTRA_TEXT,
|
NoteQuickActionItem(
|
||||||
externalLinkForNote(note),
|
icon = Icons.Default.Share,
|
||||||
)
|
label = stringResource(R.string.quick_action_share),
|
||||||
putExtra(
|
) {
|
||||||
Intent.EXTRA_TITLE,
|
val sendIntent =
|
||||||
context.getString(R.string.quick_action_share_browser_link),
|
Intent().apply {
|
||||||
)
|
action = Intent.ACTION_SEND
|
||||||
}
|
type = "text/plain"
|
||||||
|
putExtra(
|
||||||
|
Intent.EXTRA_TEXT,
|
||||||
|
externalLinkForNote(note),
|
||||||
|
)
|
||||||
|
putExtra(
|
||||||
|
Intent.EXTRA_TITLE,
|
||||||
|
context.getString(R.string.quick_action_share_browser_link),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
val shareIntent =
|
val shareIntent =
|
||||||
Intent.createChooser(
|
Intent.createChooser(
|
||||||
sendIntent,
|
sendIntent,
|
||||||
context.getString(R.string.quick_action_share),
|
context.getString(R.string.quick_action_share),
|
||||||
)
|
)
|
||||||
ContextCompat.startActivity(context, shareIntent, null)
|
ContextCompat.startActivity(context, shareIntent, null)
|
||||||
onDismiss()
|
onDismiss()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isOwnNote) {
|
if (!isOwnNote) {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ fun RefreshingChatroomFeedView(
|
|||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
routeForLastRead: String,
|
routeForLastRead: String,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
avoidDraft: String? = null,
|
avoidDraft: String? = null,
|
||||||
scrollStateKey: String? = null,
|
scrollStateKey: String? = null,
|
||||||
enablePullRefresh: Boolean = true,
|
enablePullRefresh: Boolean = true,
|
||||||
@@ -65,6 +66,7 @@ fun RefreshingChatroomFeedView(
|
|||||||
nav,
|
nav,
|
||||||
routeForLastRead,
|
routeForLastRead,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
avoidDraft,
|
avoidDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -79,6 +81,7 @@ fun RenderChatroomFeedView(
|
|||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
routeForLastRead: String,
|
routeForLastRead: String,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
avoidDraft: String? = null,
|
avoidDraft: String? = null,
|
||||||
) {
|
) {
|
||||||
val feedState by viewModel.feedContent.collectAsStateWithLifecycle()
|
val feedState by viewModel.feedContent.collectAsStateWithLifecycle()
|
||||||
@@ -99,6 +102,7 @@ fun RenderChatroomFeedView(
|
|||||||
nav,
|
nav,
|
||||||
routeForLastRead,
|
routeForLastRead,
|
||||||
onWantsToReply,
|
onWantsToReply,
|
||||||
|
onWantsToEditDraft,
|
||||||
avoidDraft,
|
avoidDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -117,6 +121,7 @@ fun ChatroomFeedLoaded(
|
|||||||
nav: (String) -> Unit,
|
nav: (String) -> Unit,
|
||||||
routeForLastRead: String,
|
routeForLastRead: String,
|
||||||
onWantsToReply: (Note) -> Unit,
|
onWantsToReply: (Note) -> Unit,
|
||||||
|
onWantsToEditDraft: (Note) -> Unit,
|
||||||
avoidDraft: String? = null,
|
avoidDraft: String? = null,
|
||||||
) {
|
) {
|
||||||
LaunchedEffect(state.feed.value.firstOrNull()) {
|
LaunchedEffect(state.feed.value.firstOrNull()) {
|
||||||
@@ -140,6 +145,7 @@ fun ChatroomFeedLoaded(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
onWantsToReply = onWantsToReply,
|
onWantsToReply = onWantsToReply,
|
||||||
|
onWantsToEditDraft = onWantsToEditDraft,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
NewSubject(item)
|
NewSubject(item)
|
||||||
|
|||||||
@@ -614,7 +614,14 @@ fun NoteMaster(
|
|||||||
ReactionsRow(note, true, editState, accountViewModel, nav)
|
ReactionsRow(note, true, editState, accountViewModel, nav)
|
||||||
}
|
}
|
||||||
|
|
||||||
NoteQuickActionMenu(note, popupExpanded, { popupExpanded = false }, accountViewModel)
|
NoteQuickActionMenu(
|
||||||
|
note = note,
|
||||||
|
popupExpanded = popupExpanded,
|
||||||
|
onDismiss = { popupExpanded = false },
|
||||||
|
onWantsToEditDraft = { },
|
||||||
|
accountViewModel = accountViewModel,
|
||||||
|
nav = nav,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -298,6 +298,9 @@ fun ChannelScreen(
|
|||||||
routeForLastRead = "Channel/${channel.idHex}",
|
routeForLastRead = "Channel/${channel.idHex}",
|
||||||
avoidDraft = newPostModel.draftTag,
|
avoidDraft = newPostModel.draftTag,
|
||||||
onWantsToReply = { replyTo.value = it },
|
onWantsToReply = { replyTo.value = it },
|
||||||
|
onWantsToEditDraft = {
|
||||||
|
newPostModel.load(accountViewModel, null, null, null, null, it)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,6 +402,7 @@ fun DisplayReplyingToNote(
|
|||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
onWantsToReply = {},
|
onWantsToReply = {},
|
||||||
|
onWantsToEditDraft = {},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ fun ChatroomScreen(
|
|||||||
onWantsToReply = {
|
onWantsToReply = {
|
||||||
replyTo.value = it
|
replyTo.value = it
|
||||||
},
|
},
|
||||||
|
onWantsToEditDraft = {
|
||||||
|
newPostModel.load(accountViewModel, null, null, null, null, it)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user