mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-19 23:50:30 +02:00
Adds hidden notes to chat.
This commit is contained in:
@@ -59,14 +59,27 @@ fun ChatroomMessageCompose(baseNote: Note, routeForLastRead: String?, innerQuote
|
|||||||
val accountState by accountViewModel.accountLiveData.observeAsState()
|
val accountState by accountViewModel.accountLiveData.observeAsState()
|
||||||
val account = accountState?.account ?: return
|
val account = accountState?.account ?: return
|
||||||
|
|
||||||
|
val noteReportsState by baseNote.liveReports.observeAsState()
|
||||||
|
val noteForReports = noteReportsState?.note ?: return
|
||||||
|
|
||||||
val accountUser = account.userProfile()
|
val accountUser = account.userProfile()
|
||||||
|
|
||||||
var popupExpanded by remember { mutableStateOf(false) }
|
var popupExpanded by remember { mutableStateOf(false) }
|
||||||
|
var showHiddenNote by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
val context = LocalContext.current.applicationContext
|
val context = LocalContext.current.applicationContext
|
||||||
|
|
||||||
if (note?.event == null) {
|
if (note?.event == null) {
|
||||||
BlankNote(Modifier)
|
BlankNote(Modifier)
|
||||||
|
} else if (!account.isAcceptable(noteForReports) && !showHiddenNote) {
|
||||||
|
HiddenNote(
|
||||||
|
account.getRelevantReports(noteForReports),
|
||||||
|
account.userProfile(),
|
||||||
|
Modifier,
|
||||||
|
innerQuote,
|
||||||
|
navController,
|
||||||
|
onClick = { showHiddenNote = true }
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
var backgroundBubbleColor: Color
|
var backgroundBubbleColor: Color
|
||||||
var alignment: Arrangement.Horizontal
|
var alignment: Arrangement.Horizontal
|
||||||
|
Reference in New Issue
Block a user